Code Search for Developers
 
 
  

PermisoEJB.java from Negest at Krugle


Show PermisoEJB.java syntax highlighted

package tk.sabreWulf.negest.entity.security;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import com.finalist.util.log.LogService;
import com.finalist.util.log.Logger;

/**
 * The Permiso entity bean.
 *
 * @author  Jose Manuel Molina Pascual  Sabre Wulf
 * @version $Revision: 1.14 $, $Date: 2005/07/07 14:31:52 $
 */
@Table(name = "Permiso")
@Entity
public class PermisoEJB implements Serializable, PermisoIf {

   /**
    * The logger object.
    */
   private static Logger log = LogService.getLogger(PermisoEJB.class);


//   @Inject
//   private EntityManager manager;

   private java.lang.Long id;
   private java.lang.String codigo;
   private java.lang.String descripcion;

   /**
    * Default constructor.
    */
   public PermisoEJB() {
   }

   /**
    * Value object constructor.
    */
   public PermisoEJB(tk.sabreWulf.negest.entity.security.PermisoIf value) {
      setId(value.getId());
      setCodigo(value.getCodigo());
      setDescripcion(value.getDescripcion());
   }

   /**
    * Creates a new entity bean and returns the primary key.
    * If the primary key of the value object has been set, this key will be used.
    * If the primary key is set to null, the UniqueId generator will be used to generate a primary key.
    *
    * @param value a <code>PermisoIf</code>
    * @return the primary key for this Permiso
    */
   public java.lang.Long create(tk.sabreWulf.negest.entity.security.PermisoIf value) {
      setId(value.getId());
      setCodigo(value.getCodigo());
      setDescripcion(value.getDescripcion());
//      if (value.getId() == null) {
//         value.setId(UniqueIdGenerator.getInstance().getLongId("Permiso"));
//      }
      setId(value.getId());
      return value.getPrimaryKey();
   }

    /**
     * Return the primary key.
     *
     * @return java.lang.Long with the primary key.
     */
   @javax.persistence.Transient
   public java.lang.Long getPrimaryKey() {
        return getId();
    }

    /**
     * Set the primary key.
     *
     * @param primaryKey the primary key
     */
   @javax.persistence.Transient
   public void setPrimaryKey(java.lang.Long primaryKey) {
       setId(primaryKey);
    }

   /**
    * Returns the value of the <code>id</code> property.
    *
    */
   @Column(name = "id")
   @Id @GeneratedValue
   public java.lang.Long getId() {
      return id;
   }

   /**
    * Sets the value of the <code>id</code> property.
    *
    * @param id the value for the <code>id</code> property
    */
   public void setId(java.lang.Long id) {
      this.id = id;
   }

   /**
    * Returns the value of the <code>codigo</code> property.
    *
    */
   @Column(name = "Codigo")
   public java.lang.String getCodigo() {
      return codigo;
   }

   /**
    * Sets the value of the <code>codigo</code> property.
    *
    * @param codigo the value for the <code>codigo</code> property
    */
   public void setCodigo(java.lang.String codigo) {
      this.codigo = codigo;
   }

   /**
    * Returns the value of the <code>descripcion</code> property.
    *
    */
   @Column(name = "Descripcion")
   public java.lang.String getDescripcion() {
      return descripcion;
   }

   /**
    * Sets the value of the <code>descripcion</code> property.
    *
    * @param descripcion the value for the <code>descripcion</code> property
    */
   public void setDescripcion(java.lang.String descripcion) {
      this.descripcion = descripcion;
   }
}




See more files for this project here

Negest

This project aims to offer the SOHO integrated platform to track their customers, the events generated by/with them, the orders and billing, warehouses, customer locations and equipment. Its a CMP/ERP, with its focus on water treatment business, for this

Project homepage: http://sourceforge.net/projects/negest
Programming language(s): Java,XML
License: other

  PermisoEJB.java
  PermisorolalmacenEJB.java
  PermisorolcentroEJB.java
  PermisorolclienteEJB.java
  PermisorolproveedorEJB.java
  PermisorolreportinstanceEJB.java
  PermisorolreporttypeEJB.java
  RolEJB.java
  RolpermisosEJB.java
  UsuarioEJB.java