public class GenericValue extends GenericEntity
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,Object> |
originalDbValues
This Map will contain the original field values from the database iff
this GenericValue came from the database.
|
Map<String,List<GenericValue>> |
relatedCache
HashMap to cache various related entity collections
|
Map<String,GenericValue> |
relatedOneCache
HashMap to cache various related cardinality on entity collections
|
delegatorName, entityName, fields, internalDelegator, modelEntity, modified| Constructor and Description |
|---|
GenericValue(GenericDelegator internalDelegator,
ModelEntity modelEntity)
Creates new GenericValue
|
GenericValue(GenericDelegator internalDelegator,
ModelEntity modelEntity,
Map<String,?> fields)
Creates new GenericValue from existing Map
|
GenericValue(GenericPK primaryKey)
Creates new GenericValue from existing GenericValue
|
GenericValue(GenericValue value)
Creates new GenericValue from existing GenericValue
|
GenericValue(ModelEntity modelEntity)
Deprecated.
|
GenericValue(ModelEntity modelEntity,
Map<String,?> fields)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
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() |
Object |
getOriginalDbValue(String name) |
List<GenericValue> |
getRelated(String relationName)
Get the named Related Entity for the GenericValue from the persistent store
|
List<GenericValue> |
getRelated(String relationName,
Map<String,?> byAndFields,
List<String> orderBy)
Get the named Related Entity for the GenericValue from the persistent store
|
List<GenericValue> |
getRelatedByAnd(String relationName,
Map<String,?> fields)
Get the named Related Entity for the GenericValue from the persistent store and filter it
|
List<GenericValue> |
getRelatedByAndCache(String relationName,
Map<String,?> 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)
|
List<GenericValue> |
getRelatedByAndEmbeddedCache(String relationName,
Map<String,?> 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.
|
List<GenericValue> |
getRelatedCache(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)
|
List<GenericValue> |
getRelatedCache(String relationName,
Map<String,?> byAndFields,
List<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(String relationName)
Get a dummy primary key for the named Related Entity for the GenericValue
|
GenericPK |
getRelatedDummyPK(String relationName,
Map<String,?> byAndFields)
Get a dummy primary key for the named Related Entity for the GenericValue
|
List<GenericValue> |
getRelatedEmbeddedCache(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.
|
List<GenericValue> |
getRelatedEmbeddedCache(String relationName,
Map<String,?> byAndFields,
List<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.
|
List<GenericValue> |
getRelatedMulti(String relationNameOne,
String relationNameTwo)
Get the named Related Entity for the GenericValue from the persistent store across another Relation.
|
List<GenericValue> |
getRelatedMulti(String relationNameOne,
String relationNameTwo,
List<String> orderBy)
Get the named Related Entity for the GenericValue from the persistent store across another Relation.
|
GenericValue |
getRelatedOne(String relationName)
Get the named Related Entity for the GenericValue from the persistent store
|
GenericValue |
getRelatedOneCache(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(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.
|
List<GenericValue> |
getRelatedOrderBy(String relationName,
List<String> orderBy)
Get the named Related Entity for the GenericValue from the persistent store and order it
|
List<GenericValue> |
getRelatedOrderByCache(String relationName,
List<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)
|
List<GenericValue> |
getRelatedOrderByEmbeddedCache(String relationName,
List<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 |
remove() |
void |
removeRelated(String relationName)
Remove the named Related Entity for the GenericValue from the persistent store
|
void |
store() |
addToXmlDocument, clear, compareTo, containsKey, containsPrimaryKey, containsValue, dangerousGetNoCheckButFast, dangerousSetNoCheckButFast, entrySet, equals, get, get, getAllFields, getAllKeys, getBoolean, getBytes, getDate, getDelegator, getDouble, getEntityName, getFields, getFloat, getInteger, getLong, getModelEntity, getPrimaryKey, getString, getTime, getTimestamp, hashCode, isEmpty, isModified, isPrimaryKey, keySet, lockEnabled, makeXmlDocument, makeXmlElement, makeXmlElement, matchesFields, put, putAll, remove, set, set, setBytes, setDelegator, setFields, setNonPKFields, setNonPKFields, setPKFields, setPKFields, setString, size, toString, values, writeXmlTextaddObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChangedfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic transient Map<String,List<GenericValue>> relatedCache
public transient Map<String,GenericValue> relatedOneCache
public GenericValue(GenericDelegator internalDelegator, ModelEntity modelEntity)
public GenericValue(GenericDelegator internalDelegator, ModelEntity modelEntity, Map<String,?> fields)
public GenericValue(ModelEntity modelEntity)
GenericValue(GenericDelegator internalDelegator, ModelEntity modelEntity)public GenericValue(ModelEntity modelEntity, Map<String,?> fields)
GenericValue(GenericDelegator internalDelegator, ModelEntity modelEntity, Map fields)public GenericValue(GenericValue value)
public GenericValue(GenericPK primaryKey)
public GenericValue create() throws GenericEntityException
GenericEntityExceptionpublic void store()
throws GenericEntityException
GenericEntityExceptionpublic void remove()
throws GenericEntityException
GenericEntityExceptionpublic void refresh()
throws GenericEntityException
GenericEntityExceptionpublic boolean originalDbValuesAvailable()
public void copyOriginalDbValues()
public List<GenericValue> getRelated(String relationName) throws GenericEntityException
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 fileGenericEntityExceptionpublic List<GenericValue> getRelated(String relationName, Map<String,?> byAndFields, List<String> orderBy) throws GenericEntityException
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 filebyAndFields - the fields that must equal in order to keep; may be nullorderBy - The fields of the named entity to order the query by; may be null;
optionally add a " ASC" for ascending or " DESC" for descendingGenericEntityExceptionpublic List<GenericValue> getRelatedCache(String relationName) throws GenericEntityException
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 fileGenericEntityExceptionpublic List<GenericValue> getRelatedMulti(String relationNameOne, String relationNameTwo, List<String> orderBy) throws GenericEntityException
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 relationrelationNameTwo - String containing the relation name for second relationorderBy - The fields of the named entity to order the query by; may be null;
optionally add a " ASC" for ascending or " DESC" for descendingGenericEntityExceptionpublic List<GenericValue> getRelatedMulti(String relationNameOne, String relationNameTwo) throws GenericEntityException
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 relationrelationNameTwo - String containing the relation name for second relationGenericEntityExceptionpublic List<GenericValue> getRelatedCache(String relationName, Map<String,?> byAndFields, List<String> orderBy) throws GenericEntityException
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 filebyAndFields - the fields that must equal in order to keep; may be nullorderBy - The fields of the named entity to order the query by; may be null;
optionally add a " ASC" for ascending or " DESC" for descendingGenericEntityExceptionpublic List<GenericValue> getRelatedEmbeddedCache(String relationName) throws GenericEntityException
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 fileGenericEntityExceptionpublic List<GenericValue> getRelatedEmbeddedCache(String relationName, Map<String,?> byAndFields, List<String> orderBy) throws GenericEntityException
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 filebyAndFields - the fields that must equal in order to keep; may be nullorderBy - The fields of the named entity to order the query by; may be null;
optionally add a " ASC" for ascending or " DESC" for descendingGenericEntityExceptionpublic GenericValue getRelatedOne(String relationName) throws GenericEntityException
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 fileGenericEntityExceptionpublic GenericValue getRelatedOneCache(String relationName) throws GenericEntityException
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 fileGenericEntityExceptionpublic GenericValue getRelatedOneEmbeddedCache(String relationName) throws GenericEntityException
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 fileGenericEntityExceptionpublic List<GenericValue> getRelatedByAnd(String relationName, Map<String,?> fields) throws GenericEntityException
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 filefields - the fields that must equal in order to keepGenericEntityExceptionpublic List<GenericValue> getRelatedByAndCache(String relationName, Map<String,?> fields) throws GenericEntityException
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 filefields - the fields that must equal in order to keepGenericEntityExceptionpublic List<GenericValue> getRelatedByAndEmbeddedCache(String relationName, Map<String,?> fields) throws GenericEntityException
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 filefields - the fields that must equal in order to keepGenericEntityExceptionpublic List<GenericValue> getRelatedOrderBy(String relationName, List<String> orderBy) throws GenericEntityException
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 fileorderBy - the order that they should be returnedGenericEntityExceptionpublic List<GenericValue> getRelatedOrderByCache(String relationName, List<String> orderBy) throws GenericEntityException
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 fileorderBy - the order that they should be returnedGenericEntityExceptionpublic List<GenericValue> getRelatedOrderByEmbeddedCache(String relationName, List<String> orderBy) throws GenericEntityException
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 fileorderBy - the order that they should be returnedGenericEntityExceptionpublic void removeRelated(String relationName) throws GenericEntityException
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 fileGenericEntityExceptionpublic GenericPK getRelatedDummyPK(String relationName) throws GenericEntityException
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 fileGenericEntityExceptionpublic GenericPK getRelatedDummyPK(String relationName, Map<String,?> byAndFields) throws GenericEntityException
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 filebyAndFields - the fields that must equal in order to keep; may be nullGenericEntityExceptionpublic Object clone()
clone in class GenericEntityCopyright © 2024 Atlassian. All rights reserved.