Code Search for Developers
 
 
  

ConceptoPK.java from Negest at Krugle


Show ConceptoPK.java syntax highlighted

package tk.sabreWulf.negest.entity.invoicing;

import com.finalist.util.log.LogService;
import com.finalist.util.log.Logger;
import javax.persistence.Embeddable;
/**
 * The tk.sabreWulf.negest.entity.invoicing.ConceptoPK composite primary key.
 *
 * @author  Jose Manuel Molina Pascual  Sabre Wulf
 * @version $Revision: 1.13 $, $Date: 2006/03/06 20:01:14 $
 *
 */
@Embeddable
public class ConceptoPK implements java.io.Serializable {

   public java.lang.Long id;
   public java.lang.Long facturaid;

   public ConceptoPK()
   {
   }

   public ConceptoPK(java.lang.Long id, java.lang.Long facturaid) {
      this.id = id;
      this.facturaid = facturaid;
   }

   public java.lang.Long getId()
   {
      return id;
   }

   public void setId(java.lang.Long id)
   {
      this.id = id;
   }
   public java.lang.Long getFacturaid()
   {
      return facturaid;
   }

   public void setFacturaid(java.lang.Long facturaid)
   {
      this.facturaid = facturaid;
   }

   public int hashCode() {
      String code = "";
      code +=  id;
      code +=  facturaid;
      return code.hashCode();
   }

   public boolean equals(Object object)
   {
       ConceptoPK pk = (ConceptoPK) object;

       boolean eq = true;

       if( object == null )
       {
          eq = false;
       }
       else
       {
         // if both fields are null, they are equal.
         if( this.id == null && pk.id == null )
         {
            eq = eq && true;
         }
         else
         {
            // So not both fields are null, than if either one is null, they are not equal.
            if(this.id == null || pk.id == null)
            {
               eq = false;
            }
            else
            {
               // If neither one is null, check the equality.
               eq = eq && this.id.equals(pk.id);
            }
         }
         // if both fields are null, they are equal.
         if( this.facturaid == null && pk.facturaid == null )
         {
            eq = eq && true;
         }
         else
         {
            // So not both fields are null, than if either one is null, they are not equal.
            if(this.facturaid == null || pk.facturaid == null)
            {
               eq = false;
            }
            else
            {
               // If neither one is null, check the equality.
               eq = eq && this.facturaid.equals(pk.facturaid);
            }
         }
      }
      return eq;
   }
}




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

  ConceptoIf.java
  ConceptoPK.java
  FacturaIf.java
  ImpuestoIf.java
  PedidoIf.java
  PresupuestoIf.java
  VersionpedidoIf.java
  VersionpresupuestoIf.java