Package org.apache.ofbiz.entity
Class GenericPK
- java.lang.Object
-
- org.apache.ofbiz.entity.GenericEntity
-
- org.apache.ofbiz.entity.GenericPK
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,java.lang.Comparable<GenericEntity>
,java.util.Map<java.lang.String,java.lang.Object>
,LocalizedMap<java.lang.Object>
public class GenericPK extends GenericEntity
Generic Entity Primary Key Object- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.ofbiz.entity.GenericEntity
GenericEntity.NULL, GenericEntity.NullField, GenericEntity.NullGenericEntity
-
-
Field Summary
-
Fields inherited from class org.apache.ofbiz.entity.GenericEntity
module, NULL_ENTITY, NULL_FIELD
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
GenericPK()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description GenericPK
clone()
Clones this GenericPK, this is a shallow clone and uses the default shallow HashMap clonestatic GenericPK
create(Delegator delegator, ModelEntity modelEntity, java.lang.Object singlePkValue)
Creates new GenericPK from existing Mapstatic GenericPK
create(Delegator delegator, ModelEntity modelEntity, java.util.Map<java.lang.String,? extends java.lang.Object> fields)
Creates new GenericPK from existing Mapstatic GenericPK
create(GenericPK value)
Creates new GenericPK from existing GenericPKstatic GenericPK
create(ModelEntity modelEntity)
Creates new GenericPKboolean
equals(java.lang.Object obj)
Determines the equality of two GenericEntity objects, overrides the default equalsint
hashCode()
Creates a hashCode for the entity, using the default String hashCode and Map hashCode, overrides the default hashCode-
Methods inherited from class org.apache.ofbiz.entity.GenericEntity
addObserver, addToXmlDocument, addToXmlElement, assertIsMutable, checkFks, clear, clearChanged, compareTo, compareToFields, containsKey, containsPrimaryKey, containsPrimaryKey, containsValue, createGenericEntity, createGenericEntity, createGenericEntity, dangerousGetNoCheckButFast, dangerousSetNoCheckButFast, deleteObserver, deleteObservers, entrySet, get, get, get, get, getAllFields, getAllKeys, getBigDecimal, getBoolean, getBytes, getDate, getDelegator, getDouble, getDuration, getEntityName, getFields, getFloat, getInteger, getIsFromEntitySync, getLong, getModelEntity, getOriginalDbValue, getPkShortValueString, getPrimaryKey, getString, getTime, getTimestamp, hasChanged, init, init, init, init, isEmpty, isModified, isMutable, isPrimaryKey, isPrimaryKey, keySet, lockEnabled, makeXmlDocument, makeXmlElement, makeXmlElement, matches, matchesFields, notifyObservers, notifyObservers, originalDbValuesAvailable, put, putAll, refreshFromValue, remove, removedFromDatasource, reset, set, set, setAllFields, setBytes, setChanged, setDelegator, setFields, setImmutable, setIsFromEntitySync, setNextSeqId, setNonPKFields, setNonPKFields, setPKFields, setPKFields, setString, size, synchronizedWithDatasource, toString, toStringInsecure, values, writeXmlText
-
-
-
-
Method Detail
-
create
public static GenericPK create(ModelEntity modelEntity)
Creates new GenericPK
-
create
public static GenericPK create(Delegator delegator, ModelEntity modelEntity, java.util.Map<java.lang.String,? extends java.lang.Object> fields)
Creates new GenericPK from existing Map
-
create
public static GenericPK create(Delegator delegator, ModelEntity modelEntity, java.lang.Object singlePkValue)
Creates new GenericPK from existing Map
-
create
public static GenericPK create(GenericPK value)
Creates new GenericPK from existing GenericPK
-
hashCode
public int hashCode()
Description copied from class:GenericEntity
Creates a hashCode for the entity, using the default String hashCode and Map hashCode, overrides the default hashCode- Specified by:
hashCode
in interfacejava.util.Map<java.lang.String,java.lang.Object>
- Overrides:
hashCode
in classGenericEntity
- Returns:
- Hashcode corresponding to this entity
-
equals
public boolean equals(java.lang.Object obj)
Description copied from class:GenericEntity
Determines the equality of two GenericEntity objects, overrides the default equals- Specified by:
equals
in interfacejava.util.Map<java.lang.String,java.lang.Object>
- Overrides:
equals
in classGenericEntity
- Parameters:
obj
- The object (GenericEntity) to compare this two- Returns:
- boolean stating if the two objects are equal
-
clone
public GenericPK clone()
Clones this GenericPK, this is a shallow clone and uses the default shallow HashMap clone- Overrides:
clone
in classGenericEntity
- Returns:
- Object that is a clone of this GenericPK
-
-