| org.ofbiz.entity.GenericEntity org.ofbiz.entity.GenericValue
GenericValue | public class GenericValue extends GenericEntity (Code) | | Generic Entity Value Object - Handles persisntence for any defined entity.
author: David E. Jones author: Eric Pabst version: $Revision: 1.4 $ since: 1.0 |
Method Summary | |
public Object | clone() | 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. | public GenericValue | create() | public Object | getOriginalDbValue(String name) | public List | getRelated(String relationName) | public List | getRelated(String relationName, List orderBy) | public List | getRelated(String relationName, Map byAndFields, List orderBy) | public List | getRelatedByAnd(String relationName, Map fields) | public List | getRelatedByAndCache(String relationName, Map fields) | public List | getRelatedByAndEmbeddedCache(String relationName, Map 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. | public List | getRelatedCache(String relationName) | public List | getRelatedCache(String relationName, Map byAndFields, List orderBy) | public List | getRelatedCache(String relationName, List orderBy) | public GenericPK | getRelatedDummyPK(String relationName) | public GenericPK | getRelatedDummyPK(String relationName, Map byAndFields) | public List | 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. | public List | getRelatedEmbeddedCache(String relationName, Map byAndFields, List 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. | public List | getRelatedMulti(String relationNameOne, String relationNameTwo, List orderBy) Get the named Related Entity for the GenericValue from the persistent store across another Relation. | public List | getRelatedMulti(String relationNameOne, String relationNameTwo) Get the named Related Entity for the GenericValue from the persistent store across another Relation. | public GenericValue | getRelatedOne(String relationName) | public GenericValue | getRelatedOneCache(String relationName) | public 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. | public List | getRelatedOrderBy(String relationName, List orderBy) | public List | getRelatedOrderByCache(String relationName, List orderBy) | public List | getRelatedOrderByEmbeddedCache(String relationName, List 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. | public boolean | originalDbValuesAvailable() | public void | refresh() | public void | remove() | public void | removeRelated(String relationName) | public void | store() | public void | synchronizedWithDatasource() |
originalDbValues | protected Map originalDbValues(Code) | | 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.
|
relatedCache | public transient Map relatedCache(Code) | | Hashtable to cache various related entity collections
|
relatedOneCache | public transient Map relatedOneCache(Code) | | Hashtable to cache various related cardinality one entity collections
|
GenericValue | public GenericValue(ModelEntity modelEntity)(Code) | | Creates new GenericValue
|
GenericValue | public GenericValue(ModelEntity modelEntity, Map fields)(Code) | | Creates new GenericValue from existing Map
|
GenericValue | public GenericValue(GenericValue value)(Code) | | Creates new GenericValue from existing GenericValue
|
GenericValue | public GenericValue(GenericPK primaryKey)(Code) | | Creates new GenericValue from existing GenericValue
|
clone | public Object clone()(Code) | | Clones this GenericValue, this is a shallow clone & uses the default shallow HashMap clone
Object that is a clone of this GenericValue |
copyOriginalDbValues | public void copyOriginalDbValues()(Code) | | 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 List getRelated(String relationName) throws GenericEntityException(Code) | | 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 List of GenericValue instances as specified in the relation definition |
getRelated | public List getRelated(String relationName, List orderBy) throws GenericEntityException(Code) | | 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 Parameters: 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 List of GenericValue instances as specified in the relation definition |
getRelated | public List getRelated(String relationName, Map byAndFields, List orderBy) throws GenericEntityException(Code) | | 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 Parameters: byAndFields - the fields that must equal in order to keep; may be null Parameters: 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 List of GenericValue instances as specified in the relation definition |
getRelatedByAnd | public List getRelatedByAnd(String relationName, Map fields) throws GenericEntityException(Code) | | 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 Parameters: fields - the fields that must equal in order to keep List of GenericValue instances as specified in the relation definition |
getRelatedByAndCache | public List getRelatedByAndCache(String relationName, Map fields) throws GenericEntityException(Code) | | 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 Parameters: fields - the fields that must equal in order to keep List of GenericValue instances as specified in the relation definition |
getRelatedByAndEmbeddedCache | public List getRelatedByAndEmbeddedCache(String relationName, Map fields) throws GenericEntityException(Code) | | 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 Parameters: fields - the fields that must equal in order to keep List of GenericValue instances as specified in the relation definition |
getRelatedCache | public List getRelatedCache(String relationName) throws GenericEntityException(Code) | | 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 List of GenericValue instances as specified in the relation definition |
getRelatedCache | public List getRelatedCache(String relationName, Map byAndFields, List orderBy) throws GenericEntityException(Code) | | 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 Parameters: byAndFields - the fields that must equal in order to keep; may be null Parameters: 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 List of GenericValue instances as specified in the relation definition |
getRelatedCache | public List getRelatedCache(String relationName, List orderBy) throws GenericEntityException(Code) | | 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 Parameters: 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 List of GenericValue instances as specified in the relation definition |
getRelatedDummyPK | public GenericPK getRelatedDummyPK(String relationName) throws GenericEntityException(Code) | | Get a dummy primary key for the named Related Entity for the GenericValue
Parameters: relationName - String containing the relation name which is thecombination of relation.title and relation.rel-entity-name asspecified in the entity XML definition file GenericPK containing a possibly incomplete PrimaryKey object representing the related entity or entities |
getRelatedDummyPK | public GenericPK getRelatedDummyPK(String relationName, Map byAndFields) throws GenericEntityException(Code) | | Get a dummy primary key for the named Related Entity for the GenericValue
Parameters: relationName - String containing the relation name which is thecombination of relation.title and relation.rel-entity-name asspecified in the entity XML definition file Parameters: byAndFields - the fields that must equal in order to keep; may be null GenericPK containing a possibly incomplete PrimaryKey object representing the related entity or entities |
getRelatedEmbeddedCache | public List getRelatedEmbeddedCache(String relationName) throws GenericEntityException(Code) | | 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 List of GenericValue instances as specified in the relation definition |
getRelatedEmbeddedCache | public List getRelatedEmbeddedCache(String relationName, Map byAndFields, List orderBy) throws GenericEntityException(Code) | | 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 Parameters: byAndFields - the fields that must equal in order to keep; may be null Parameters: 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 List of GenericValue instances as specified in the relation definition |
getRelatedMulti | public List getRelatedMulti(String relationNameOne, String relationNameTwo, List orderBy) throws GenericEntityException(Code) | | 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 thecombination of relation.title and relation.rel-entity-name asspecified in the entity XML definition file, for first relation Parameters: relationNameTwo - String containing the relation name for second relation Parameters: 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 List of GenericValue instances as specified in the relation definition |
getRelatedMulti | public List getRelatedMulti(String relationNameOne, String relationNameTwo) throws GenericEntityException(Code) | | 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 thecombination of relation.title and relation.rel-entity-name asspecified in the entity XML definition file, for first relation Parameters: relationNameTwo - String containing the relation name for second relation List of GenericValue instances as specified in the relation definition |
getRelatedOne | public GenericValue getRelatedOne(String relationName) throws GenericEntityException(Code) | | 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 List of GenericValue instances as specified in the relation definition |
getRelatedOneCache | public GenericValue getRelatedOneCache(String relationName) throws GenericEntityException(Code) | | 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 List of GenericValue instances as specified in the relation definition |
getRelatedOneEmbeddedCache | public GenericValue getRelatedOneEmbeddedCache(String relationName) throws GenericEntityException(Code) | | 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 List of GenericValue instances as specified in the relation definition |
getRelatedOrderBy | public List getRelatedOrderBy(String relationName, List orderBy) throws GenericEntityException(Code) | | 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 Parameters: orderBy - the order that they should be returned List of GenericValue instances as specified in the relation definition |
getRelatedOrderByCache | public List getRelatedOrderByCache(String relationName, List orderBy) throws GenericEntityException(Code) | | 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 Parameters: orderBy - the order that they should be returned List of GenericValue instances as specified in the relation definition |
getRelatedOrderByEmbeddedCache | public List getRelatedOrderByEmbeddedCache(String relationName, List orderBy) throws GenericEntityException(Code) | | 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 Parameters: orderBy - the order that they should be returned List of GenericValue instances as specified in the relation definition |
originalDbValuesAvailable | public boolean originalDbValuesAvailable()(Code) | | |
removeRelated | public void removeRelated(String relationName) throws GenericEntityException(Code) | | 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 |
synchronizedWithDatasource | public void synchronizedWithDatasource()(Code) | | |
Methods inherited from org.ofbiz.entity.GenericEntity | public static int addToXmlDocument(Collection values, Document document)(Code)(Java Doc) public void clear()(Code)(Java Doc) public Object clone()(Code)(Java Doc) public int compareTo(Object obj)(Code)(Java Doc) public boolean containsKey(Object key)(Code)(Java Doc) public boolean containsPrimaryKey()(Code)(Java Doc) public boolean containsValue(Object value)(Code)(Java Doc) public Object dangerousGetNoCheckButFast(ModelField modelField)(Code)(Java Doc) public void dangerousSetNoCheckButFast(ModelField modelField, Object value)(Code)(Java Doc) public java.util.Set entrySet()(Code)(Java Doc) public boolean equals(Object obj)(Code)(Java Doc) public Object get(String name)(Code)(Java Doc) public Object get(String name, Locale locale)(Code)(Java Doc) public Object get(String name, String resource, Locale locale)(Code)(Java Doc) public Object get(Object key)(Code)(Java Doc) public Map getAllFields()(Code)(Java Doc) public Collection getAllKeys()(Code)(Java Doc) public Boolean getBoolean(String name)(Code)(Java Doc) public byte[] getBytes(String name)(Code)(Java Doc) public java.sql.Date getDate(String name)(Code)(Java Doc) public GenericDelegator getDelegator()(Code)(Java Doc) public Double getDouble(String name)(Code)(Java Doc) public String getEntityName()(Code)(Java Doc) public Map getFields(Collection keysofFields)(Code)(Java Doc) public Float getFloat(String name)(Code)(Java Doc) public Integer getInteger(String name)(Code)(Java Doc) public boolean getIsFromEntitySync()(Code)(Java Doc) public Long getLong(String name)(Code)(Java Doc) public ModelEntity getModelEntity()(Code)(Java Doc) public GenericPK getPrimaryKey()(Code)(Java Doc) public String getString(String name)(Code)(Java Doc) public java.sql.Time getTime(String name)(Code)(Java Doc) public java.sql.Timestamp getTimestamp(String name)(Code)(Java Doc) public int hashCode()(Code)(Java Doc) public boolean isEmpty()(Code)(Java Doc) public boolean isModified()(Code)(Java Doc) public boolean isMutable()(Code)(Java Doc) public boolean isPrimaryKey()(Code)(Java Doc) public java.util.Set keySet()(Code)(Java Doc) public boolean lockEnabled()(Code)(Java Doc) public static Document makeXmlDocument(Collection values)(Code)(Java Doc) public Element makeXmlElement(Document document)(Code)(Java Doc) public Element makeXmlElement(Document document, String prefix)(Code)(Java Doc) public boolean matchesFields(Map keyValuePairs)(Code)(Java Doc) public Object put(Object key, Object value)(Code)(Java Doc) public void putAll(java.util.Map map)(Code)(Java Doc) public void refreshFromValue(GenericEntity newValue) throws GenericEntityException(Code)(Java Doc) public Object remove(Object key)(Code)(Java Doc) public void removedFromDatasource()(Code)(Java Doc) public void set(String name, Object value)(Code)(Java Doc) public synchronized Object set(String name, Object value, boolean setIfNull)(Code)(Java Doc) public void setAllFields(Map fields, boolean setIfEmpty, String namePrefix, Boolean pks)(Code)(Java Doc) public void setBytes(String name, byte[] bytes)(Code)(Java Doc) public void setDelegator(GenericDelegator internalDelegator)(Code)(Java Doc) public synchronized void setFields(Map keyValuePairs)(Code)(Java Doc) public void setImmutable()(Code)(Java Doc) public void setIsFromEntitySync(boolean isFromEntitySync)(Code)(Java Doc) public void setNonPKFields(Map fields)(Code)(Java Doc) public void setNonPKFields(Map fields, boolean setIfEmpty)(Code)(Java Doc) public void setPKFields(Map fields)(Code)(Java Doc) public void setPKFields(Map fields, boolean setIfEmpty)(Code)(Java Doc) public void setString(String name, String value)(Code)(Java Doc) public int size()(Code)(Java Doc) public void synchronizedWithDatasource()(Code)(Java Doc) public String toString()(Code)(Java Doc) public java.util.Collection values()(Code)(Java Doc) public void writeXmlText(PrintWriter writer, String prefix)(Code)(Java Doc)
|
|
|