org.ofbiz.entity
Class GenericValue

java.lang.Object
  extended by java.util.Observable
      extended by org.ofbiz.entity.GenericEntity
          extended by org.ofbiz.entity.GenericValue
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<GenericEntity>, java.util.Map<java.lang.String,java.lang.Object>, LocalizedMap
Direct Known Subclasses:
GenericValue.NullGenericValue, GenericValueHtmlWrapper

public class GenericValue
extends GenericEntity

Generic Entity Value Object - Handles persistence for any defined entity.

See Also:
Serialized Form

Nested Class Summary
protected static class GenericValue.NullGenericValue
           
 
Nested classes/interfaces inherited from class org.ofbiz.entity.GenericEntity
GenericEntity.NULL, GenericEntity.NullField, GenericEntity.NullGenericEntity
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Field Summary
protected static  genericValueFactory
           
static GenericValue NULL_VALUE
           
protected  java.util.Map<java.lang.String,java.lang.Object> originalDbValues
          This Map will contain the original field values from the database iff this GenericValue came from the database.
 java.util.Map<java.lang.String,java.util.List<GenericValue>> relatedCache
          Map to cache various related entity collections
 java.util.Map<java.lang.String,GenericValue> relatedOneCache
          Map to cache various related cardinality one entity collections
 
Fields inherited from class org.ofbiz.entity.GenericEntity
cachedHashCode, delegatorName, entityName, fields, generateHashCode, internalDelegator, isFromEntitySync, modelEntity, modified, module, mutable, NULL_ENTITY, NULL_FIELD
 
Constructor Summary
protected GenericValue()
           
 
Method Summary
 boolean checkFks(boolean insertDummy)
          Checks to see if all foreign key records exist in the database.
 void clearEmbeddedCache()
           
 java.lang.Object clone()
          Clones this GenericValue, this is a shallow clone & uses the default shallow HashMap clone
 void copyOriginalDbValues()
          This should only be called by the Entity Engine once a GenericValue has been read from the database so that we have a copy of the original field values from the Db.
 GenericValue create()
           
static GenericValue create(GenericPK primaryKey)
          Creates new GenericValue from existing GenericValue
static GenericValue create(GenericValue value)
          Creates new GenericValue from existing GenericValue
static GenericValue create(ModelEntity modelEntity)
          Creates new GenericValue
static GenericValue create(ModelEntity modelEntity, java.util.Map<java.lang.String,? extends java.lang.Object> fields)
          Creates new GenericValue from existing Map
static GenericValue create(ModelEntity modelEntity, java.lang.Object singlePkValue)
          Creates new GenericValue from existing Map
 java.lang.Object getOriginalDbValue(java.lang.String name)
           
 java.util.List<GenericValue> getRelated(java.lang.String relationName)
          Get the named Related Entity for the GenericValue from the persistent store
 java.util.List<GenericValue> getRelated(java.lang.String relationName, java.util.List<java.lang.String> orderBy)
          Get the named Related Entity for the GenericValue from the persistent store
 java.util.List<GenericValue> getRelated(java.lang.String relationName, java.util.Map<java.lang.String,? extends java.lang.Object> byAndFields, java.util.List<java.lang.String> orderBy)
          Get the named Related Entity for the GenericValue from the persistent store
 java.util.List<GenericValue> getRelatedByAnd(java.lang.String relationName, java.util.Map<java.lang.String,? extends java.lang.Object> fields)
          Get the named Related Entity for the GenericValue from the persistent store and filter it
 java.util.List<GenericValue> getRelatedByAndCache(java.lang.String relationName, java.util.Map<java.lang.String,? extends java.lang.Object> fields)
          Get the named Related Entity for the GenericValue from the persistent store and filter it, looking first in the global generic cache (for the moment this isn't true, is same as EmbeddedCache variant)
 java.util.List<GenericValue> getRelatedByAndEmbeddedCache(java.lang.String relationName, java.util.Map<java.lang.String,? extends java.lang.Object> fields)
          Get the named Related Entity for the GenericValue from the persistent store and filter it, looking first in a cache associated with this entity which is destroyed with this ValueObject when no longer used.
 java.util.List<GenericValue> getRelatedCache(java.lang.String relationName)
          Get the named Related Entity for the GenericValue from the persistent store, looking first in the global generic cache (for the moment this isn't true, is same as EmbeddedCache variant)
 java.util.List<GenericValue> getRelatedCache(java.lang.String relationName, java.util.List<java.lang.String> orderBy)
          Get the named Related Entity for the GenericValue from the persistent store, looking first in the global generic cache (for the moment this isn't true, is same as EmbeddedCache variant)
 java.util.List<GenericValue> getRelatedCache(java.lang.String relationName, java.util.Map<java.lang.String,? extends java.lang.Object> byAndFields, java.util.List<java.lang.String> orderBy)
          Get the named Related Entity for the GenericValue from the persistent store, looking first in the global generic cache (for the moment this isn't true, is same as EmbeddedCache variant)
 GenericPK getRelatedDummyPK(java.lang.String relationName)
          Get a dummy primary key for the named Related Entity for the GenericValue
 GenericPK getRelatedDummyPK(java.lang.String relationName, java.util.Map<java.lang.String,? extends java.lang.Object> byAndFields)
          Get a dummy primary key for the named Related Entity for the GenericValue
 java.util.List<GenericValue> getRelatedEmbeddedCache(java.lang.String relationName)
          Get the named Related Entity for the GenericValue from the persistent store, looking first in a cache associated with this entity which is destroyed with this ValueObject when no longer used.
 java.util.List<GenericValue> getRelatedEmbeddedCache(java.lang.String relationName, java.util.Map<java.lang.String,? extends java.lang.Object> byAndFields, java.util.List<java.lang.String> orderBy)
          Get the named Related Entity for the GenericValue from the persistent store, looking first in a cache associated with this entity which is destroyed with this ValueObject when no longer used.
 java.util.List<GenericValue> getRelatedMulti(java.lang.String relationNameOne, java.lang.String relationNameTwo)
          Get the named Related Entity for the GenericValue from the persistent store across another Relation.
 java.util.List<GenericValue> getRelatedMulti(java.lang.String relationNameOne, java.lang.String relationNameTwo, java.util.List<java.lang.String> orderBy)
          Get the named Related Entity for the GenericValue from the persistent store across another Relation.
 GenericValue getRelatedOne(java.lang.String relationName)
          Get the named Related Entity for the GenericValue from the persistent store
 GenericValue getRelatedOneCache(java.lang.String relationName)
          Get the named Related Entity for the GenericValue from the persistent store, looking first in the global generic cache (for the moment this isn't true, is same as EmbeddedCache variant)
 GenericValue getRelatedOneEmbeddedCache(java.lang.String relationName)
          Get the named Related Entity for the GenericValue from the persistent store, looking first in a cache associated with this entity which is destroyed with this ValueObject when no longer used.
 java.util.List<GenericValue> getRelatedOrderBy(java.lang.String relationName, java.util.List<java.lang.String> orderBy)
          Get the named Related Entity for the GenericValue from the persistent store and order it
 java.util.List<GenericValue> getRelatedOrderByCache(java.lang.String relationName, java.util.List<java.lang.String> orderBy)
          Get the named Related Entity for the GenericValue from the persistent store and order it, looking first in the global generic cache (for the moment this isn't true, is same as EmbeddedCache variant)
 java.util.List<GenericValue> getRelatedOrderByEmbeddedCache(java.lang.String relationName, java.util.List<java.lang.String> orderBy)
          Get the named Related Entity for the GenericValue from the persistent store and order it, looking first in a cache associated with this entity which is destroyed with this ValueObject when no longer used.
 boolean originalDbValuesAvailable()
           
 void refresh()
           
 void refreshFromCache()
           
 void remove()
           
 void removeRelated(java.lang.String relationName)
          Remove the named Related Entity for the GenericValue from the persistent store
 void removeRelatedEmbeddedCache(java.lang.String relationName)
           
 void reset()
           
 void store()
           
 void storeRelatedEmbeddedCache(java.lang.String relationName, GenericValue value)
           
 void storeRelatedEmbeddedCache(java.lang.String relationName, java.util.List<GenericValue> col)
           
 void synchronizedWithDatasource()
           
 
Methods inherited from class org.ofbiz.entity.GenericEntity
addToXmlDocument, addToXmlElement, clear, compareTo, compareToFields, containsKey, containsPrimaryKey, containsPrimaryKey, containsValue, createGenericEntity, createGenericEntity, createGenericEntity, dangerousGetNoCheckButFast, dangerousSetNoCheckButFast, entrySet, equals, get, get, get, get, getAllFields, getAllKeys, getBigDecimal, getBoolean, getBytes, getDate, getDelegator, getDouble, getEntityName, getFields, getFloat, getInteger, getIsFromEntitySync, getLong, getModelEntity, getPkShortValueString, getPrimaryKey, getString, getTime, getTimestamp, hashCode, init, init, init, init, isEmpty, isModified, isMutable, isPrimaryKey, isPrimaryKey, keySet, lockEnabled, makeXmlDocument, makeXmlElement, makeXmlElement, matches, matchesFields, put, putAll, refreshFromValue, remove, removedFromDatasource, set, set, setAllFields, setBytes, setDelegator, setFields, setImmutable, setIsFromEntitySync, setNextSeqId, setNonPKFields, setNonPKFields, setPKFields, setPKFields, setString, size, toString, toStringInsecure, values, writeXmlText
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NULL_VALUE

public static final GenericValue NULL_VALUE

genericValueFactory

protected static final  genericValueFactory

relatedCache

public transient java.util.Map<java.lang.String,java.util.List<GenericValue>> relatedCache
Map to cache various related entity collections


relatedOneCache

public transient java.util.Map<java.lang.String,GenericValue> relatedOneCache
Map to cache various related cardinality one entity collections


originalDbValues

protected java.util.Map<java.lang.String,java.lang.Object> originalDbValues
This Map will contain the original field values from the database iff this GenericValue came from the database. If it was made manually it will no have this Map, ie it will be null to not take up memory.

Constructor Detail

GenericValue

protected GenericValue()
Method Detail

create

public static GenericValue create(ModelEntity modelEntity)
Creates new GenericValue


create

public static GenericValue create(ModelEntity modelEntity,
                                  java.util.Map<java.lang.String,? extends java.lang.Object> fields)
Creates new GenericValue from existing Map


create

public static GenericValue create(ModelEntity modelEntity,
                                  java.lang.Object singlePkValue)
Creates new GenericValue from existing Map


create

public static GenericValue create(GenericValue value)
Creates new GenericValue from existing GenericValue


create

public static GenericValue create(GenericPK primaryKey)
Creates new GenericValue from existing GenericValue


reset

public void reset()
Overrides:
reset in class GenericEntity

synchronizedWithDatasource

public void synchronizedWithDatasource()
Overrides:
synchronizedWithDatasource in class GenericEntity

create

public GenericValue create()
                    throws GenericEntityException
Throws:
GenericEntityException

store

public void store()
           throws GenericEntityException
Throws:
GenericEntityException

remove

public void remove()
            throws GenericEntityException
Throws:
GenericEntityException

refresh

public void refresh()
             throws GenericEntityException
Throws:
GenericEntityException

refreshFromCache

public void refreshFromCache()
                      throws GenericEntityException
Throws:
GenericEntityException

originalDbValuesAvailable

public boolean originalDbValuesAvailable()

getOriginalDbValue

public java.lang.Object getOriginalDbValue(java.lang.String name)

copyOriginalDbValues

public void copyOriginalDbValues()
This should only be called by the Entity Engine once a GenericValue has been read from the database so that we have a copy of the original field values from the Db.


getRelated

public java.util.List<GenericValue> getRelated(java.lang.String relationName)
                                        throws GenericEntityException
Get the named Related Entity for the GenericValue from the persistent store

Parameters:
relationName - String containing the relation name which is the combination of relation.title and relation.rel-entity-name as specified in the entity XML definition file
Returns:
List of GenericValue instances as specified in the relation definition
Throws:
GenericEntityException

getRelated

public java.util.List<GenericValue> getRelated(java.lang.String relationName,
                                               java.util.List<java.lang.String> orderBy)
                                        throws GenericEntityException
Get the named Related Entity for the GenericValue from the persistent store

Parameters:
relationName - String containing the relation name which is the combination of relation.title and relation.rel-entity-name as specified in the entity XML definition file
orderBy - The fields of the named entity to order the query by; may be null; optionally add a " ASC" for ascending or " DESC" for descending
Returns:
List of GenericValue instances as specified in the relation definition
Throws:
GenericEntityException

getRelated

public java.util.List<GenericValue> getRelated(java.lang.String relationName,
                                               java.util.Map<java.lang.String,? extends java.lang.Object> byAndFields,
                                               java.util.List<java.lang.String> orderBy)
                                        throws GenericEntityException
Get the named Related Entity for the GenericValue from the persistent store

Parameters:
relationName - String containing the relation name which is the combination of relation.title and relation.rel-entity-name as specified in the entity XML definition file
byAndFields - the fields that must equal in order to keep; may be null
orderBy - The fields of the named entity to order the query by; may be null; optionally add a " ASC" for ascending or " DESC" for descending
Returns:
List of GenericValue instances as specified in the relation definition
Throws:
GenericEntityException

getRelatedCache

public java.util.List<GenericValue> getRelatedCache(java.lang.String relationName)
                                             throws GenericEntityException
Get the named Related Entity for the GenericValue from the persistent store, looking first in the global generic cache (for the moment this isn't true, is same as EmbeddedCache variant)

Parameters:
relationName - String containing the relation name which is the combination of relation.title and relation.rel-entity-name as specified in the entity XML definition file
Returns:
List of GenericValue instances as specified in the relation definition
Throws:
GenericEntityException

getRelatedMulti

public java.util.List<GenericValue> getRelatedMulti(java.lang.String relationNameOne,
                                                    java.lang.String relationNameTwo,
                                                    java.util.List<java.lang.String> orderBy)
                                             throws GenericEntityException
Get the named Related Entity for the GenericValue from the persistent store across another Relation. Helps to get related Values in a multi-to-multi relationship.

Parameters:
relationNameOne - String containing the relation name which is the combination of relation.title and relation.rel-entity-name as specified in the entity XML definition file, for first relation
relationNameTwo - String containing the relation name for second relation
orderBy - The fields of the named entity to order the query by; may be null; optionally add a " ASC" for ascending or " DESC" for descending
Returns:
List of GenericValue instances as specified in the relation definition
Throws:
GenericEntityException

getRelatedMulti

public java.util.List<GenericValue> getRelatedMulti(java.lang.String relationNameOne,
                                                    java.lang.String relationNameTwo)
                                             throws GenericEntityException
Get the named Related Entity for the GenericValue from the persistent store across another Relation. Helps to get related Values in a multi-to-multi relationship.

Parameters:
relationNameOne - String containing the relation name which is the combination of relation.title and relation.rel-entity-name as specified in the entity XML definition file, for first relation
relationNameTwo - String containing the relation name for second relation
Returns:
List of GenericValue instances as specified in the relation definition
Throws:
GenericEntityException

getRelatedCache

public java.util.List<GenericValue> getRelatedCache(java.lang.String relationName,
                                                    java.util.Map<java.lang.String,? extends java.lang.Object> byAndFields,
                                                    java.util.List<java.lang.String> orderBy)
                                             throws GenericEntityException
Get the named Related Entity for the GenericValue from the persistent store, looking first in the global generic cache (for the moment this isn't true, is same as EmbeddedCache variant)

Parameters:
relationName - String containing the relation name which is the combination of relation.title and relation.rel-entity-name as specified in the entity XML definition file
byAndFields - the fields that must equal in order to keep; may be null
orderBy - The fields of the named entity to order the query by; may be null; optionally add a " ASC" for ascending or " DESC" for descending
Returns:
List of GenericValue instances as specified in the relation definition
Throws:
GenericEntityException

getRelatedCache

public java.util.List<GenericValue> getRelatedCache(java.lang.String relationName,
                                                    java.util.List<java.lang.String> orderBy)
                                             throws GenericEntityException
Get the named Related Entity for the GenericValue from the persistent store, looking first in the global generic cache (for the moment this isn't true, is same as EmbeddedCache variant)

Parameters:
relationName - String containing the relation name which is the combination of relation.title and relation.rel-entity-name as specified in the entity XML definition file
orderBy - The fields of the named entity to order the query by; may be null; optionally add a " ASC" for ascending or " DESC" for descending
Returns:
List of GenericValue instances as specified in the relation definition
Throws:
GenericEntityException

getRelatedEmbeddedCache

public java.util.List<GenericValue> getRelatedEmbeddedCache(java.lang.String relationName)
                                                     throws GenericEntityException
Get the named Related Entity for the GenericValue from the persistent store, looking first in a cache associated with this entity which is destroyed with this ValueObject when no longer used.

Parameters:
relationName - String containing the relation name which is the combination of relation.title and relation.rel-entity-name as specified in the entity XML definition file
Returns:
List of GenericValue instances as specified in the relation definition
Throws:
GenericEntityException

getRelatedEmbeddedCache

public java.util.List<GenericValue> getRelatedEmbeddedCache(java.lang.String relationName,
                                                            java.util.Map<java.lang.String,? extends java.lang.Object> byAndFields,
                                                            java.util.List<java.lang.String> orderBy)
                                                     throws GenericEntityException
Get the named Related Entity for the GenericValue from the persistent store, looking first in a cache associated with this entity which is destroyed with this ValueObject when no longer used.

Parameters:
relationName - String containing the relation name which is the combination of relation.title and relation.rel-entity-name as specified in the entity XML definition file
byAndFields - the fields that must equal in order to keep; may be null
orderBy - The fields of the named entity to order the query by; may be null; optionally add a " ASC" for ascending or " DESC" for descending
Returns:
List of GenericValue instances as specified in the relation definition
Throws:
GenericEntityException

removeRelatedEmbeddedCache

public void removeRelatedEmbeddedCache(java.lang.String relationName)

storeRelatedEmbeddedCache

public void storeRelatedEmbeddedCache(java.lang.String relationName,
                                      java.util.List<GenericValue> col)

storeRelatedEmbeddedCache

public void storeRelatedEmbeddedCache(java.lang.String relationName,
                                      GenericValue value)

clearEmbeddedCache

public void clearEmbeddedCache()

getRelatedOne

public GenericValue getRelatedOne(java.lang.String relationName)
                           throws GenericEntityException
Get the named Related Entity for the GenericValue from the persistent store

Parameters:
relationName - String containing the relation name which is the combination of relation.title and relation.rel-entity-name as specified in the entity XML definition file
Returns:
List of GenericValue instances as specified in the relation definition
Throws:
GenericEntityException

getRelatedOneCache

public GenericValue getRelatedOneCache(java.lang.String relationName)
                                throws GenericEntityException
Get the named Related Entity for the GenericValue from the persistent store, looking first in the global generic cache (for the moment this isn't true, is same as EmbeddedCache variant)

Parameters:
relationName - String containing the relation name which is the combination of relation.title and relation.rel-entity-name as specified in the entity XML definition file
Returns:
List of GenericValue instances as specified in the relation definition
Throws:
GenericEntityException

getRelatedOneEmbeddedCache

public GenericValue getRelatedOneEmbeddedCache(java.lang.String relationName)
                                        throws GenericEntityException
Get the named Related Entity for the GenericValue from the persistent store, looking first in a cache associated with this entity which is destroyed with this ValueObject when no longer used.

Parameters:
relationName - String containing the relation name which is the combination of relation.title and relation.rel-entity-name as specified in the entity XML definition file
Returns:
List of GenericValue instances as specified in the relation definition
Throws:
GenericEntityException

getRelatedByAnd

public java.util.List<GenericValue> getRelatedByAnd(java.lang.String relationName,
                                                    java.util.Map<java.lang.String,? extends java.lang.Object> fields)
                                             throws GenericEntityException
Get the named Related Entity for the GenericValue from the persistent store and filter it

Parameters:
relationName - String containing the relation name which is the combination of relation.title and relation.rel-entity-name as specified in the entity XML definition file
fields - the fields that must equal in order to keep
Returns:
List of GenericValue instances as specified in the relation definition
Throws:
GenericEntityException

getRelatedByAndCache

public java.util.List<GenericValue> getRelatedByAndCache(java.lang.String relationName,
                                                         java.util.Map<java.lang.String,? extends java.lang.Object> fields)
                                                  throws GenericEntityException
Get the named Related Entity for the GenericValue from the persistent store and filter it, looking first in the global generic cache (for the moment this isn't true, is same as EmbeddedCache variant)

Parameters:
relationName - String containing the relation name which is the combination of relation.title and relation.rel-entity-name as specified in the entity XML definition file
fields - the fields that must equal in order to keep
Returns:
List of GenericValue instances as specified in the relation definition
Throws:
GenericEntityException

getRelatedByAndEmbeddedCache

public java.util.List<GenericValue> getRelatedByAndEmbeddedCache(java.lang.String relationName,
                                                                 java.util.Map<java.lang.String,? extends java.lang.Object> fields)
                                                          throws GenericEntityException
Get the named Related Entity for the GenericValue from the persistent store and filter it, looking first in a cache associated with this entity which is destroyed with this ValueObject when no longer used.

Parameters:
relationName - String containing the relation name which is the combination of relation.title and relation.rel-entity-name as specified in the entity XML definition file
fields - the fields that must equal in order to keep
Returns:
List of GenericValue instances as specified in the relation definition
Throws:
GenericEntityException

getRelatedOrderBy

public java.util.List<GenericValue> getRelatedOrderBy(java.lang.String relationName,
                                                      java.util.List<java.lang.String> orderBy)
                                               throws GenericEntityException
Get the named Related Entity for the GenericValue from the persistent store and order it

Parameters:
relationName - String containing the relation name which is the combination of relation.title and relation.rel-entity-name as specified in the entity XML definition file
orderBy - the order that they should be returned
Returns:
List of GenericValue instances as specified in the relation definition
Throws:
GenericEntityException

getRelatedOrderByCache

public java.util.List<GenericValue> getRelatedOrderByCache(java.lang.String relationName,
                                                           java.util.List<java.lang.String> orderBy)
                                                    throws GenericEntityException
Get the named Related Entity for the GenericValue from the persistent store and order it, looking first in the global generic cache (for the moment this isn't true, is same as EmbeddedCache variant)

Parameters:
relationName - String containing the relation name which is the combination of relation.title and relation.rel-entity-name as specified in the entity XML definition file
orderBy - the order that they should be returned
Returns:
List of GenericValue instances as specified in the relation definition
Throws:
GenericEntityException

getRelatedOrderByEmbeddedCache

public java.util.List<GenericValue> getRelatedOrderByEmbeddedCache(java.lang.String relationName,
                                                                   java.util.List<java.lang.String> orderBy)
                                                            throws GenericEntityException
Get the named Related Entity for the GenericValue from the persistent store and order it, looking first in a cache associated with this entity which is destroyed with this ValueObject when no longer used.

Parameters:
relationName - String containing the relation name which is the combination of relation.title and relation.rel-entity-name as specified in the entity XML definition file
orderBy - the order that they should be returned
Returns:
List of GenericValue instances as specified in the relation definition
Throws:
GenericEntityException

removeRelated

public void removeRelated(java.lang.String relationName)
                   throws GenericEntityException
Remove the named Related Entity for the GenericValue from the persistent store

Parameters:
relationName - String containing the relation name which is the combination of relation.title and relation.rel-entity-name as specified in the entity XML definition file
Throws:
GenericEntityException

getRelatedDummyPK

public GenericPK getRelatedDummyPK(java.lang.String relationName)
                            throws GenericEntityException
Get a dummy primary key for the named Related Entity for the GenericValue

Parameters:
relationName - String containing the relation name which is the combination of relation.title and relation.rel-entity-name as specified in the entity XML definition file
Returns:
GenericPK containing a possibly incomplete PrimaryKey object representing the related entity or entities
Throws:
GenericEntityException

getRelatedDummyPK

public GenericPK getRelatedDummyPK(java.lang.String relationName,
                                   java.util.Map<java.lang.String,? extends java.lang.Object> byAndFields)
                            throws GenericEntityException
Get a dummy primary key for the named Related Entity for the GenericValue

Parameters:
relationName - String containing the relation name which is the combination of relation.title and relation.rel-entity-name as specified in the entity XML definition file
byAndFields - the fields that must equal in order to keep; may be null
Returns:
GenericPK containing a possibly incomplete PrimaryKey object representing the related entity or entities
Throws:
GenericEntityException

checkFks

public boolean checkFks(boolean insertDummy)
                 throws GenericEntityException
Checks to see if all foreign key records exist in the database. Will create a dummy value for those missing when specified.

Parameters:
insertDummy - Create a dummy record using the provided fields
Returns:
true if all FKs exist (or when all missing are created)
Throws:
GenericEntityException

clone

public java.lang.Object clone()
Clones this GenericValue, this is a shallow clone & uses the default shallow HashMap clone

Overrides:
clone in class GenericEntity
Returns:
Object that is a clone of this GenericValue