Some space changes.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@881681 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -63,7 +63,7 @@ public interface Delegator {
|
||||
* Remove a CACHED Generic Entity from the cache by its primary key, does
|
||||
* NOT check to see if the passed GenericPK is a complete primary key. Also
|
||||
* tries to clear the corresponding all cache entry.
|
||||
*
|
||||
*
|
||||
* @param primaryKey
|
||||
* The primary key to clear by.
|
||||
*/
|
||||
@@ -76,7 +76,7 @@ public interface Delegator {
|
||||
* tries to remove entries from the all cache, the by primary key cache, and
|
||||
* the by and cache. This is the ONLY method that tries to clear
|
||||
* automatically from the by and cache.
|
||||
*
|
||||
*
|
||||
* @param value
|
||||
* The GenericValue to clear by.
|
||||
*/
|
||||
@@ -86,7 +86,7 @@ public interface Delegator {
|
||||
|
||||
/**
|
||||
* Remove all CACHED Generic Entity (List) from the cache
|
||||
*
|
||||
*
|
||||
* @param entityName
|
||||
* The Name of the Entity as defined in the entity XML file
|
||||
*/
|
||||
@@ -95,7 +95,7 @@ public interface Delegator {
|
||||
/**
|
||||
* Remove a CACHED Generic Entity (List) from the cache, either a PK, ByAnd,
|
||||
* or All
|
||||
*
|
||||
*
|
||||
* @param entityName
|
||||
* The Name of the Entity as defined in the entity XML file
|
||||
* @param fields
|
||||
@@ -107,7 +107,7 @@ public interface Delegator {
|
||||
/**
|
||||
* Remove a CACHED Generic Entity (List) from the cache, either a PK, ByAnd,
|
||||
* or All
|
||||
*
|
||||
*
|
||||
* @param entityName
|
||||
* The Name of the Entity as defined in the entity XML file
|
||||
* @param fields
|
||||
@@ -127,7 +127,7 @@ public interface Delegator {
|
||||
* complete primary key it will remove the cache line from the andCache. If
|
||||
* the fields map is empty, then the allCache for the entity will be
|
||||
* cleared.
|
||||
*
|
||||
*
|
||||
* @param dummyPK
|
||||
* The dummy primary key to clear by.
|
||||
*/
|
||||
@@ -142,7 +142,7 @@ public interface Delegator {
|
||||
/**
|
||||
* Creates a Entity in the form of a GenericValue and write it to the
|
||||
* datasource
|
||||
*
|
||||
*
|
||||
* @param primaryKey
|
||||
* The GenericPK to create a value in the datasource from
|
||||
* @return GenericValue instance containing the new instance
|
||||
@@ -152,7 +152,7 @@ public interface Delegator {
|
||||
/**
|
||||
* Creates a Entity in the form of a GenericValue and write it to the
|
||||
* datasource
|
||||
*
|
||||
*
|
||||
* @param primaryKey
|
||||
* The GenericPK to create a value in the datasource from
|
||||
* @param doCacheClear
|
||||
@@ -165,7 +165,7 @@ public interface Delegator {
|
||||
/**
|
||||
* Creates a Entity in the form of a GenericValue and write it to the
|
||||
* datasource
|
||||
*
|
||||
*
|
||||
* @param value
|
||||
* The GenericValue to create a value in the datasource from
|
||||
* @return GenericValue instance containing the new instance
|
||||
@@ -175,7 +175,7 @@ public interface Delegator {
|
||||
/**
|
||||
* Creates a Entity in the form of a GenericValue and write it to the
|
||||
* datasource
|
||||
*
|
||||
*
|
||||
* @param value
|
||||
* The GenericValue to create a value in the datasource from
|
||||
* @param doCacheClear
|
||||
@@ -188,7 +188,7 @@ public interface Delegator {
|
||||
/**
|
||||
* Creates a Entity in the form of a GenericValue and write it to the
|
||||
* database
|
||||
*
|
||||
*
|
||||
* @return GenericValue instance containing the new instance
|
||||
*/
|
||||
public GenericValue create(String entityName, Map<String, ? extends Object> fields) throws GenericEntityException;
|
||||
@@ -196,14 +196,14 @@ public interface Delegator {
|
||||
/**
|
||||
* Creates a Entity in the form of a GenericValue and write it to the
|
||||
* database
|
||||
*
|
||||
*
|
||||
* @return GenericValue instance containing the new instance
|
||||
*/
|
||||
public GenericValue create(String entityName, Object... fields) throws GenericEntityException;
|
||||
|
||||
/**
|
||||
* Creates or stores an Entity
|
||||
*
|
||||
*
|
||||
* @param value
|
||||
* The GenericValue instance containing the new or existing
|
||||
* instance
|
||||
@@ -213,7 +213,7 @@ public interface Delegator {
|
||||
|
||||
/**
|
||||
* Creates or stores an Entity
|
||||
*
|
||||
*
|
||||
* @param value
|
||||
* The GenericValue instance containing the new or existing
|
||||
* instance
|
||||
@@ -229,7 +229,7 @@ public interface Delegator {
|
||||
* then does a create in the database as normal. The reason to do it this
|
||||
* way is that it will retry and fix the sequence if somehow the sequencer
|
||||
* is in a bad state and returning a value that already exists.
|
||||
*
|
||||
*
|
||||
* @param value
|
||||
* The GenericValue to create a value in the datasource from
|
||||
* @return GenericValue instance containing the new instance
|
||||
@@ -239,7 +239,7 @@ public interface Delegator {
|
||||
/**
|
||||
* Creates a Entity in the form of a GenericValue and write it to the
|
||||
* database
|
||||
*
|
||||
*
|
||||
* @return GenericValue instance containing the new instance
|
||||
*/
|
||||
public GenericValue createSingle(String entityName, Object singlePkValue) throws GenericEntityException;
|
||||
@@ -258,7 +258,7 @@ public interface Delegator {
|
||||
* Finds GenericValues by the conditions specified in the EntityCondition
|
||||
* object, the the EntityCondition javadoc for more details. NOTE 20080502:
|
||||
* 3 references
|
||||
*
|
||||
*
|
||||
* @param entityName
|
||||
* The name of the Entity as defined in the entity XML file
|
||||
* @param whereEntityCondition
|
||||
@@ -289,7 +289,7 @@ public interface Delegator {
|
||||
/**
|
||||
* Finds Generic Entity records by all of the specified fields (ie: combined
|
||||
* using AND) NOTE 20080502: 264 references
|
||||
*
|
||||
*
|
||||
* @param entityName
|
||||
* The Name of the Entity as defined in the entity XML file
|
||||
* @param fields
|
||||
@@ -302,7 +302,7 @@ public interface Delegator {
|
||||
/**
|
||||
* Finds Generic Entity records by all of the specified fields (ie: combined
|
||||
* using AND) NOTE 20080502: 72 references
|
||||
*
|
||||
*
|
||||
* @param entityName
|
||||
* The Name of the Entity as defined in the entity XML file
|
||||
* @param fields
|
||||
@@ -319,7 +319,7 @@ public interface Delegator {
|
||||
/**
|
||||
* Finds Generic Entity records by all of the specified fields (ie: combined
|
||||
* using AND) NOTE 20080502: 1 references
|
||||
*
|
||||
*
|
||||
* @param entityName
|
||||
* The Name of the Entity as defined in the entity XML file
|
||||
* @param fields
|
||||
@@ -333,7 +333,7 @@ public interface Delegator {
|
||||
* Finds Generic Entity records by all of the specified fields (ie: combined
|
||||
* using AND), looking first in the cache; uses orderBy for lookup, but only
|
||||
* keys results on the entityName and fields NOTE 20080502: 91 references
|
||||
*
|
||||
*
|
||||
* @param entityName
|
||||
* The Name of the Entity as defined in the entity XML file
|
||||
* @param fields
|
||||
@@ -347,7 +347,7 @@ public interface Delegator {
|
||||
* Finds Generic Entity records by all of the specified fields (ie: combined
|
||||
* using AND), looking first in the cache; uses orderBy for lookup, but only
|
||||
* keys results on the entityName and fields NOTE 20080502: 56 references
|
||||
*
|
||||
*
|
||||
* @param entityName
|
||||
* The Name of the Entity as defined in the entity XML file
|
||||
* @param fields
|
||||
@@ -365,7 +365,7 @@ public interface Delegator {
|
||||
* Find a Generic Entity by its Primary Key NOTE 20080502: 550 references
|
||||
* (20080503 521 left); needs to be deprecated, should use findOne instead,
|
||||
* but lots of stuff to replace!
|
||||
*
|
||||
*
|
||||
* @param entityName
|
||||
* The Name of the Entity as defined in the entity XML file
|
||||
* @param fields
|
||||
@@ -378,7 +378,7 @@ public interface Delegator {
|
||||
/**
|
||||
* Find a CACHED Generic Entity by its Primary Key NOTE 20080502: 218
|
||||
* references
|
||||
*
|
||||
*
|
||||
* @param entityName
|
||||
* The Name of the Entity as defined in the entity XML file
|
||||
* @param fields
|
||||
@@ -391,7 +391,7 @@ public interface Delegator {
|
||||
/**
|
||||
* Find a CACHED Generic Entity by its Primary Key NOTE 20080502: 2
|
||||
* references
|
||||
*
|
||||
*
|
||||
* @param entityName
|
||||
* The Name of the Entity as defined in the entity XML file
|
||||
* @param fields
|
||||
@@ -404,7 +404,7 @@ public interface Delegator {
|
||||
/**
|
||||
* Find a Generic Entity by its Primary Key and only returns the values
|
||||
* requested by the passed keys (names) NOTE 20080502: 3 references
|
||||
*
|
||||
*
|
||||
* @param primaryKey
|
||||
* The primary key to find by.
|
||||
* @param keys
|
||||
@@ -423,7 +423,7 @@ public interface Delegator {
|
||||
* Finds GenericValues by the conditions specified in the EntityCondition
|
||||
* object, the the EntityCondition javadoc for more details. NOTE 20080502:
|
||||
* 12 references
|
||||
*
|
||||
*
|
||||
* @param entityName
|
||||
* The name of the Entity as defined in the entity XML file
|
||||
* @param entityCondition
|
||||
@@ -448,7 +448,7 @@ public interface Delegator {
|
||||
* Finds GenericValues by the conditions specified in the EntityCondition
|
||||
* object, the the EntityCondition javadoc for more details. NOTE 20080502:
|
||||
* 9 references
|
||||
*
|
||||
*
|
||||
* @param dynamicViewEntity
|
||||
* The DynamicViewEntity to use for the entity model for this
|
||||
* query; generally created on the fly for limited use
|
||||
@@ -479,7 +479,7 @@ public interface Delegator {
|
||||
|
||||
/**
|
||||
* Find a Generic Entity by its Primary Key NOTE 20080502: 6 references
|
||||
*
|
||||
*
|
||||
* @param entityName
|
||||
* The Name of the Entity as defined in the entity XML file
|
||||
* @param fields
|
||||
@@ -491,7 +491,7 @@ public interface Delegator {
|
||||
|
||||
/**
|
||||
* Find a Generic Entity by its Primary Key NOTE 20080502: 6 references
|
||||
*
|
||||
*
|
||||
* @param entityName
|
||||
* The Name of the Entity as defined in the entity XML file
|
||||
* @param fields
|
||||
@@ -510,7 +510,7 @@ public interface Delegator {
|
||||
/**
|
||||
* Gets a field type instance by name from the helper that corresponds to
|
||||
* the specified entity
|
||||
*
|
||||
*
|
||||
* @param entity
|
||||
* The entity
|
||||
* @param type
|
||||
@@ -523,7 +523,7 @@ public interface Delegator {
|
||||
/**
|
||||
* Gets field type names from the helper that corresponds to the specified
|
||||
* entity
|
||||
*
|
||||
*
|
||||
* @param entity
|
||||
* The entity
|
||||
* @return Collection of field type names from the helper that corresponds
|
||||
@@ -534,7 +534,7 @@ public interface Delegator {
|
||||
/**
|
||||
* Gets the helper name that corresponds to this delegator and the specified
|
||||
* entityName
|
||||
*
|
||||
*
|
||||
* @param entityName
|
||||
* The name of the entity to get the helper for
|
||||
* @return String with the helper name that corresponds to this delegator
|
||||
@@ -545,7 +545,7 @@ public interface Delegator {
|
||||
/**
|
||||
* Gets the an instance of helper that corresponds to this delegator and the
|
||||
* specified entity
|
||||
*
|
||||
*
|
||||
* @param entity
|
||||
* The entity to get the helper for
|
||||
* @return GenericHelper that corresponds to this delegator and the
|
||||
@@ -556,7 +556,7 @@ public interface Delegator {
|
||||
/**
|
||||
* Gets the an instance of helper that corresponds to this delegator and the
|
||||
* specified entityName
|
||||
*
|
||||
*
|
||||
* @param entityName
|
||||
* The name of the entity to get the helper for
|
||||
* @return GenericHelper that corresponds to this delegator and the
|
||||
@@ -567,7 +567,7 @@ public interface Delegator {
|
||||
/**
|
||||
* Gets the helper name that corresponds to this delegator and the specified
|
||||
* entity
|
||||
*
|
||||
*
|
||||
* @param entity
|
||||
* The entity to get the helper for
|
||||
* @return String with the helper name that corresponds to this delegator
|
||||
@@ -578,7 +578,7 @@ public interface Delegator {
|
||||
/**
|
||||
* Gets the helper name that corresponds to this delegator and the specified
|
||||
* entityName
|
||||
*
|
||||
*
|
||||
* @param entityName
|
||||
* The name of the entity to get the helper name for
|
||||
* @return String with the helper name that corresponds to this delegator
|
||||
@@ -591,7 +591,7 @@ public interface Delegator {
|
||||
/**
|
||||
* Gets the helper name that corresponds to this delegator and the specified
|
||||
* entityName
|
||||
*
|
||||
*
|
||||
* @param groupName
|
||||
* The name of the group to get the helper name for
|
||||
* @return String with the helper name that corresponds to this delegator
|
||||
@@ -602,7 +602,7 @@ public interface Delegator {
|
||||
/**
|
||||
* Gets the instance of ModelEntity that corresponds to this delegator and
|
||||
* the specified entityName
|
||||
*
|
||||
*
|
||||
* @param entityName
|
||||
* The name of the entity to get
|
||||
* @return ModelEntity that corresponds to this delegator and the specified
|
||||
@@ -613,7 +613,7 @@ public interface Delegator {
|
||||
/**
|
||||
* Gets a Map of entity name & entity model pairs that are in the named
|
||||
* group
|
||||
*
|
||||
*
|
||||
* @param groupName
|
||||
* The name of the group
|
||||
* @return Map of entityName String keys and ModelEntity instance values
|
||||
@@ -624,14 +624,14 @@ public interface Delegator {
|
||||
|
||||
/**
|
||||
* Gets the instance of ModelGroupReader that corresponds to this delegator
|
||||
*
|
||||
*
|
||||
* @return ModelGroupReader that corresponds to this delegator
|
||||
*/
|
||||
public ModelGroupReader getModelGroupReader();
|
||||
|
||||
/**
|
||||
* Gets the instance of ModelReader that corresponds to this delegator
|
||||
*
|
||||
*
|
||||
* @return ModelReader that corresponds to this delegator
|
||||
*/
|
||||
public ModelReader getModelReader();
|
||||
@@ -640,7 +640,7 @@ public interface Delegator {
|
||||
* 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. NOTE 20080502: 0 references
|
||||
*
|
||||
*
|
||||
* @param relationNameOne
|
||||
* String containing the relation name which is the combination
|
||||
* of relation.title and relation.rel-entity-name as specified in
|
||||
@@ -660,7 +660,7 @@ public interface Delegator {
|
||||
* 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. NOTE 20080502: 3 references
|
||||
*
|
||||
*
|
||||
* @param relationNameOne
|
||||
* String containing the relation name which is the combination
|
||||
* of relation.title and relation.rel-entity-name as specified in
|
||||
@@ -681,7 +681,7 @@ public interface Delegator {
|
||||
/**
|
||||
* Get the next guaranteed unique seq id from the sequence with the given
|
||||
* sequence name; if the named sequence doesn't exist, it will be created
|
||||
*
|
||||
*
|
||||
* @param seqName
|
||||
* The name of the sequence to get the next seq id from
|
||||
* @return String with the next sequenced id for the given sequence name
|
||||
@@ -691,7 +691,7 @@ public interface Delegator {
|
||||
/**
|
||||
* Get the next guaranteed unique seq id from the sequence with the given
|
||||
* sequence name; if the named sequence doesn't exist, it will be created
|
||||
*
|
||||
*
|
||||
* @param seqName
|
||||
* The name of the sequence to get the next seq id from
|
||||
* @param staggerMax
|
||||
@@ -706,7 +706,7 @@ public interface Delegator {
|
||||
/**
|
||||
* Get the next guaranteed unique seq id from the sequence with the given
|
||||
* sequence name; if the named sequence doesn't exist, it will be created
|
||||
*
|
||||
*
|
||||
* @param seqName
|
||||
* The name of the sequence to get the next seq id from
|
||||
* @return Long with the next sequenced id for the given sequence name
|
||||
@@ -716,7 +716,7 @@ public interface Delegator {
|
||||
/**
|
||||
* Get the next guaranteed unique seq id from the sequence with the given
|
||||
* sequence name; if the named sequence doesn't exist, it will be created
|
||||
*
|
||||
*
|
||||
* @param seqName
|
||||
* The name of the sequence to get the next seq id from
|
||||
* @param staggerMax
|
||||
@@ -731,7 +731,7 @@ public interface Delegator {
|
||||
/**
|
||||
* Gets the name of the server configuration that corresponds to this
|
||||
* delegator
|
||||
*
|
||||
*
|
||||
* @return server configuration name
|
||||
*/
|
||||
public String getOriginalDelegatorName();
|
||||
@@ -739,7 +739,7 @@ public interface Delegator {
|
||||
/**
|
||||
* Get the named Related Entity for the GenericValue from the persistent
|
||||
* store NOTE 20080502: 5 references
|
||||
*
|
||||
*
|
||||
* @param relationName
|
||||
* String containing the relation name which is the combination
|
||||
* of relation.title and relation.rel-entity-name as specified in
|
||||
@@ -761,7 +761,7 @@ public interface Delegator {
|
||||
* Get the named Related Entity for the GenericValue from the persistent
|
||||
* store, checking first in the cache to see if the desired value is there
|
||||
* NOTE 20080502: 4 references
|
||||
*
|
||||
*
|
||||
* @param relationName
|
||||
* String containing the relation name which is the combination
|
||||
* of relation.title and relation.rel-entity-name as specified in
|
||||
@@ -776,7 +776,7 @@ public interface Delegator {
|
||||
/**
|
||||
* Get a dummy primary key for the named Related Entity for the GenericValue
|
||||
* NOTE 20080502: 2 references
|
||||
*
|
||||
*
|
||||
* @param relationName
|
||||
* String containing the relation name which is the combination
|
||||
* of relation.title and relation.rel-entity-name as specified in
|
||||
@@ -793,7 +793,7 @@ public interface Delegator {
|
||||
/**
|
||||
* Get related entity where relation is of type one, uses findByPrimaryKey
|
||||
* NOTE 20080502: 7 references
|
||||
*
|
||||
*
|
||||
* @throws IllegalArgumentException
|
||||
* if the list found has more than one item
|
||||
*/
|
||||
@@ -803,7 +803,7 @@ public interface Delegator {
|
||||
* Get related entity where relation is of type one, uses findByPrimaryKey,
|
||||
* checking first in the cache to see if the desired value is there NOTE
|
||||
* 20080502: 1 references
|
||||
*
|
||||
*
|
||||
* @throws IllegalArgumentException
|
||||
* if the list found has more than one item
|
||||
*/
|
||||
@@ -864,7 +864,7 @@ public interface Delegator {
|
||||
|
||||
/**
|
||||
* Refresh the Entity for the GenericValue from the persistent store
|
||||
*
|
||||
*
|
||||
* @param value
|
||||
* GenericValue instance containing the entity to refresh
|
||||
*/
|
||||
@@ -872,7 +872,7 @@ public interface Delegator {
|
||||
|
||||
/**
|
||||
* Refresh the Entity for the GenericValue from the persistent store
|
||||
*
|
||||
*
|
||||
* @param value
|
||||
* GenericValue instance containing the entity to refresh
|
||||
* @param doCacheClear
|
||||
@@ -883,7 +883,7 @@ public interface Delegator {
|
||||
|
||||
/**
|
||||
* Refresh the Entity for the GenericValue from the cache
|
||||
*
|
||||
*
|
||||
* @param value
|
||||
* GenericValue instance containing the entity to refresh
|
||||
*/
|
||||
@@ -902,7 +902,7 @@ public interface Delegator {
|
||||
* the removeByAnd method. <br/>These updates all happen in one transaction,
|
||||
* so they will either all succeed or all fail, if the data source supports
|
||||
* transactions.
|
||||
*
|
||||
*
|
||||
* @param dummyPKs
|
||||
* Collection of GenericEntity instances containing the entities
|
||||
* or by and fields to remove
|
||||
@@ -920,7 +920,7 @@ public interface Delegator {
|
||||
* the removeByAnd method. <br/>These updates all happen in one transaction,
|
||||
* so they will either all succeed or all fail, if the data source supports
|
||||
* transactions.
|
||||
*
|
||||
*
|
||||
* @param dummyPKs
|
||||
* Collection of GenericEntity instances containing the entities
|
||||
* or by and fields to remove
|
||||
@@ -936,7 +936,7 @@ public interface Delegator {
|
||||
/**
|
||||
* Removes/deletes Generic Entity records found by all of the specified
|
||||
* fields (ie: combined using AND)
|
||||
*
|
||||
*
|
||||
* @param entityName
|
||||
* The Name of the Entity as defined in the entity XML file
|
||||
* @param doCacheClear
|
||||
@@ -952,7 +952,7 @@ public interface Delegator {
|
||||
/**
|
||||
* Removes/deletes Generic Entity records found by all of the specified
|
||||
* fields (ie: combined using AND)
|
||||
*
|
||||
*
|
||||
* @param entityName
|
||||
* The Name of the Entity as defined in the entity XML file
|
||||
* @param fields
|
||||
@@ -965,7 +965,7 @@ public interface Delegator {
|
||||
/**
|
||||
* Removes/deletes Generic Entity records found by all of the specified
|
||||
* fields (ie: combined using AND)
|
||||
*
|
||||
*
|
||||
* @param entityName
|
||||
* The Name of the Entity as defined in the entity XML file
|
||||
* @param fields
|
||||
@@ -981,7 +981,7 @@ public interface Delegator {
|
||||
/**
|
||||
* Removes/deletes Generic Entity records found by all of the specified
|
||||
* fields (ie: combined using AND)
|
||||
*
|
||||
*
|
||||
* @param entityName
|
||||
* The Name of the Entity as defined in the entity XML file
|
||||
* @param fields
|
||||
@@ -993,7 +993,7 @@ public interface Delegator {
|
||||
|
||||
/**
|
||||
* Removes/deletes Generic Entity records found by the condition
|
||||
*
|
||||
*
|
||||
* @param entityName
|
||||
* The Name of the Entity as defined in the entity XML file
|
||||
* @param condition
|
||||
@@ -1004,7 +1004,7 @@ public interface Delegator {
|
||||
|
||||
/**
|
||||
* Removes/deletes Generic Entity records found by the condition
|
||||
*
|
||||
*
|
||||
* @param entityName
|
||||
* The Name of the Entity as defined in the entity XML file
|
||||
* @param condition
|
||||
@@ -1018,7 +1018,7 @@ public interface Delegator {
|
||||
|
||||
/**
|
||||
* Remove a Generic Entity corresponding to the primaryKey
|
||||
*
|
||||
*
|
||||
* @param primaryKey
|
||||
* The primary key of the entity to remove.
|
||||
* @return int representing number of rows effected by this operation
|
||||
@@ -1027,7 +1027,7 @@ public interface Delegator {
|
||||
|
||||
/**
|
||||
* Remove a Generic Entity corresponding to the primaryKey
|
||||
*
|
||||
*
|
||||
* @param primaryKey
|
||||
* The primary key of the entity to remove.
|
||||
* @param doCacheClear
|
||||
@@ -1040,7 +1040,7 @@ public interface Delegator {
|
||||
/**
|
||||
* Remove the named Related Entity for the GenericValue from the persistent
|
||||
* store
|
||||
*
|
||||
*
|
||||
* @param relationName
|
||||
* String containing the relation name which is the combination
|
||||
* of relation.title and relation.rel-entity-name as specified in
|
||||
@@ -1054,7 +1054,7 @@ public interface Delegator {
|
||||
/**
|
||||
* Remove the named Related Entity for the GenericValue from the persistent
|
||||
* store
|
||||
*
|
||||
*
|
||||
* @param relationName
|
||||
* String containing the relation name which is the combination
|
||||
* of relation.title and relation.rel-entity-name as specified in
|
||||
@@ -1070,7 +1070,7 @@ public interface Delegator {
|
||||
|
||||
/**
|
||||
* Remove a Generic Value from the database
|
||||
*
|
||||
*
|
||||
* @param value
|
||||
* The GenericValue object of the entity to remove.
|
||||
* @return int representing number of rows effected by this operation
|
||||
@@ -1079,7 +1079,7 @@ public interface Delegator {
|
||||
|
||||
/**
|
||||
* Remove a Generic Value from the database
|
||||
*
|
||||
*
|
||||
* @param value
|
||||
* The GenericValue object of the entity to remove.
|
||||
* @param doCacheClear
|
||||
@@ -1112,7 +1112,7 @@ public interface Delegator {
|
||||
|
||||
/**
|
||||
* Store the Entity from the GenericValue to the persistent store
|
||||
*
|
||||
*
|
||||
* @param value
|
||||
* GenericValue instance containing the entity
|
||||
* @return int representing number of rows effected by this operation
|
||||
@@ -1121,7 +1121,7 @@ public interface Delegator {
|
||||
|
||||
/**
|
||||
* Store the Entity from the GenericValue to the persistent store
|
||||
*
|
||||
*
|
||||
* @param value
|
||||
* GenericValue instance containing the entity
|
||||
* @param doCacheClear
|
||||
@@ -1140,7 +1140,7 @@ public interface Delegator {
|
||||
* will either all succeed or all fail, if the data source supports
|
||||
* transactions. This is just like to othersToStore feature of the
|
||||
* GenericEntity on a create or store.
|
||||
*
|
||||
*
|
||||
* @param values
|
||||
* List of GenericValue instances containing the entities to
|
||||
* store
|
||||
@@ -1157,7 +1157,7 @@ public interface Delegator {
|
||||
* will either all succeed or all fail, if the data source supports
|
||||
* transactions. This is just like to othersToStore feature of the
|
||||
* GenericEntity on a create or store.
|
||||
*
|
||||
*
|
||||
* @param values
|
||||
* List of GenericValue instances containing the entities to
|
||||
* store
|
||||
@@ -1177,7 +1177,7 @@ public interface Delegator {
|
||||
* will either all succeed or all fail, if the data source supports
|
||||
* transactions. This is just like to othersToStore feature of the
|
||||
* GenericEntity on a create or store.
|
||||
*
|
||||
*
|
||||
* @param values
|
||||
* List of GenericValue instances containing the entities to
|
||||
* store
|
||||
@@ -1193,7 +1193,7 @@ public interface Delegator {
|
||||
|
||||
/**
|
||||
* Store a group of values
|
||||
*
|
||||
*
|
||||
* @param entityName
|
||||
* The name of the Entity as defined in the entity XML file
|
||||
* @param fieldsToSet
|
||||
@@ -1207,7 +1207,7 @@ public interface Delegator {
|
||||
|
||||
/**
|
||||
* Store a group of values
|
||||
*
|
||||
*
|
||||
* @param entityName
|
||||
* The name of the Entity as defined in the entity XML file
|
||||
* @param fieldsToSet
|
||||
|
||||
@@ -54,5 +54,5 @@ public class DelegatorFactoryImpl extends DelegatorFactory {
|
||||
}
|
||||
return delegator;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ public class GenericDelegator implements Delegator {
|
||||
private boolean testRollbackInProgress = false;
|
||||
private List<TestOperation> testOperations = null;
|
||||
private enum OperationType {INSERT, UPDATE, DELETE};
|
||||
|
||||
|
||||
private String originalDelegatorName = null;
|
||||
|
||||
/** @deprecated Use Delegator delegator = DelegatorFactory.getDelegator(delegatorName);
|
||||
@@ -341,7 +341,7 @@ public class GenericDelegator implements Delegator {
|
||||
public String getDelegatorName() {
|
||||
return this.delegatorName;
|
||||
}
|
||||
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.ofbiz.entity.Delegator#getOriginalDelegatorName()
|
||||
*/
|
||||
@@ -481,7 +481,7 @@ public class GenericDelegator implements Delegator {
|
||||
public ModelFieldType getEntityFieldType(ModelEntity entity, String type) throws GenericEntityException {
|
||||
return this.getModelFieldTypeReader(entity).getModelFieldType(type);
|
||||
}
|
||||
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.ofbiz.entity.Delegator#getModelFieldTypeReader(org.ofbiz.entity.model.ModelEntity)
|
||||
*/
|
||||
@@ -3181,7 +3181,7 @@ public class GenericDelegator implements Delegator {
|
||||
public GenericDelegator cloneDelegator() {
|
||||
return this.cloneDelegator(this.delegatorName);
|
||||
}
|
||||
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.ofbiz.entity.Delegator#makeTestDelegator(java.lang.String)
|
||||
*/
|
||||
@@ -3200,7 +3200,7 @@ public class GenericDelegator implements Delegator {
|
||||
this.testOperations.clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void storeForTestRollback(TestOperation testOperation) {
|
||||
if (!this.testMode || this.testRollbackInProgress) {
|
||||
throw new IllegalStateException("An attempt was made to store a TestOperation during rollback or outside of test mode");
|
||||
|
||||
@@ -591,7 +591,7 @@ public class GenericEntity extends Observable implements Map<String, Object>, Lo
|
||||
* The field's Java data type can be either <code>String</code> or
|
||||
* <code>Number</code>. Invalid Java data types will throw
|
||||
* <code>IllegalArgumentException</code>.
|
||||
*
|
||||
*
|
||||
* @param name The name of the desired field
|
||||
* @return A <code>TimeDuration</code> instance or <code>null</code>
|
||||
*/
|
||||
@@ -601,11 +601,11 @@ public class GenericEntity extends Observable implements Map<String, Object>, Lo
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
Number number = (Number) obj;
|
||||
Number number = (Number) obj;
|
||||
return TimeDuration.fromNumber(number);
|
||||
} catch (Exception e) {}
|
||||
try {
|
||||
String duration = (String) obj;
|
||||
String duration = (String) obj;
|
||||
return TimeDuration.parseDuration(duration);
|
||||
} catch (Exception e) {}
|
||||
throw new IllegalArgumentException("getDuration could not map the object '" + obj.toString() + "' to TimeDuration type, incompatible object type: " + obj.getClass().getName());
|
||||
|
||||
+1
-1
@@ -109,7 +109,7 @@ public abstract class AbstractEntityConditionCache<K, V> extends AbstractCache<E
|
||||
return conditionCache;
|
||||
}
|
||||
|
||||
protected static final <K,V> boolean isNull(Map<K,V> value) {
|
||||
protected static final <K,V> boolean isNull(Map<K,V> value) {
|
||||
return value == null || value == GenericEntity.NULL_ENTITY || value == GenericValue.NULL_VALUE;
|
||||
}
|
||||
|
||||
|
||||
@@ -106,26 +106,26 @@ public class EntityConditionSubSelect extends EntityConditionValue {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public EntityConditionValue freeze() {
|
||||
return new EntityConditionSubSelect(localModelEntity, keyFieldName, (whereCond != null ? whereCond.freeze() : null), requireAll);
|
||||
}
|
||||
|
||||
|
||||
public String getKeyFieldName() {
|
||||
return this.keyFieldName;
|
||||
}
|
||||
|
||||
|
||||
public ModelEntity getModelEntity() {
|
||||
return this.localModelEntity;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ModelField getModelField(ModelEntity modelEntity) {
|
||||
// do nothing for now
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Comparable<?> getValue(Delegator delegator, Map<String, ? extends Object> map) {
|
||||
// do nothing for now
|
||||
|
||||
@@ -284,7 +284,7 @@ public class EntityExpr extends EntityCondition {
|
||||
throw new IllegalArgumentException("Type " + curField.getType() + " not found for entity [" + modelEntity.getEntityName() + "]; probably because there is no datasource (helper) setup for the entity group that this entity is in: [" + delegator.getEntityGroupName(modelEntity.getEntityName()) + "]");
|
||||
}
|
||||
if (value instanceof EntityConditionSubSelect){
|
||||
ModelFieldType valueType=null;
|
||||
ModelFieldType valueType = null;
|
||||
try {
|
||||
ModelEntity valueModelEntity= ((EntityConditionSubSelect) value).getModelEntity();
|
||||
valueType = delegator.getEntityFieldType(valueModelEntity, valueModelEntity.getField(((EntityConditionSubSelect) value).getKeyFieldName()).getType());
|
||||
@@ -303,7 +303,7 @@ public class EntityExpr extends EntityCondition {
|
||||
String errMsg = "In entity field [" + modelEntity.getEntityName() + "." + curField.getName() + "] set the value passed in [" + value.getClass().getName() + "] is not compatible with the Java type of the field [" + type.getJavaType() + "]";
|
||||
// eventually we should do this, but for now we'll do a "soft" failure: throw new IllegalArgumentException(errMsg);
|
||||
Debug.logWarning(new Exception("Location of database type warning"), "=-=-=-=-=-=-=-=-= Database type warning in EntityExpr =-=-=-=-=-=-=-=-= " + errMsg, module);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -136,7 +136,7 @@ public class EntityFieldValue extends EntityConditionValue implements Reusable {
|
||||
public void addSqlValue(StringBuilder sql, Map<String, String> tableAliases, ModelEntity modelEntity, List<EntityConditionParam> entityConditionParams, boolean includeTableNamePrefix, DatasourceInfo datasourceInfo) {
|
||||
if (this.modelViewEntity != null) {
|
||||
// NOTE: this section is a bit of a hack; the other code is terribly complex and really needs to be refactored to incorporate support for this
|
||||
|
||||
|
||||
if (UtilValidate.isNotEmpty(entityAlias)) {
|
||||
ModelEntity memberModelEntity = modelViewEntity.getMemberModelEntity(entityAlias);
|
||||
ModelField modelField = memberModelEntity.getField(fieldName);
|
||||
@@ -152,7 +152,7 @@ public class EntityFieldValue extends EntityConditionValue implements Reusable {
|
||||
sql.append(".");
|
||||
dotUsed = true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
sql.append(entityAlias);
|
||||
sql.append("_");
|
||||
|
||||
@@ -107,11 +107,10 @@ public class EntityJoinOperator extends EntityOperator<EntityCondition, EntityCo
|
||||
visitor.visit(rhs);
|
||||
}
|
||||
|
||||
|
||||
public Boolean eval(GenericEntity entity, EntityCondition lhs, EntityCondition rhs) {
|
||||
return entityMatches(entity, lhs, rhs) ? Boolean.TRUE : Boolean.FALSE;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean entityMatches(GenericEntity entity, EntityCondition lhs, EntityCondition rhs) {
|
||||
if (lhs.entityMatches(entity) == shortCircuitValue) return shortCircuitValue;
|
||||
|
||||
@@ -229,7 +229,7 @@ public abstract class EntityOperator<L, R, T> extends EntityConditionBase {
|
||||
}
|
||||
if (obj instanceof EntityOperator) {
|
||||
EntityOperator<?,?,?> otherOper = UtilGenerics.cast(obj);
|
||||
return this.idInt == otherOper.idInt;
|
||||
return this.idInt == otherOper.idInt;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -621,7 +621,7 @@ public class GenericDAO {
|
||||
if (modelEntity == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
ModelViewEntity modelViewEntity = null;
|
||||
if (modelEntity instanceof ModelViewEntity) {
|
||||
modelViewEntity = (ModelViewEntity) modelEntity;
|
||||
@@ -683,7 +683,7 @@ public class GenericDAO {
|
||||
|
||||
// FROM clause and when necessary the JOIN or LEFT JOIN clause(s) as well
|
||||
sqlBuffer.append(SqlJdbcUtil.makeFromClause(modelEntity, datasourceInfo));
|
||||
|
||||
|
||||
// WHERE clause
|
||||
List<EntityConditionParam> whereEntityConditionParams = FastList.newInstance();
|
||||
StringBuilder whereString = makeConditionWhereString(modelEntity, whereEntityCondition, viewWhereConditions, whereEntityConditionParams);
|
||||
@@ -691,7 +691,7 @@ public class GenericDAO {
|
||||
sqlBuffer.append(" WHERE ");
|
||||
sqlBuffer.append(whereString.toString());
|
||||
}
|
||||
|
||||
|
||||
// GROUP BY clause for view-entity
|
||||
if (modelViewEntity != null) {
|
||||
String groupByString = modelViewEntity.colNameString(modelViewEntity.getGroupBysCopy(selectFields), ", ", "", false);
|
||||
@@ -721,7 +721,7 @@ public class GenericDAO {
|
||||
orderByExpanded.addAll(viewOrderByList);
|
||||
}
|
||||
sqlBuffer.append(SqlJdbcUtil.makeOrderByClause(modelEntity, orderByExpanded, datasourceInfo));
|
||||
|
||||
|
||||
// make the final SQL String
|
||||
String sql = sqlBuffer.toString();
|
||||
|
||||
@@ -760,13 +760,13 @@ public class GenericDAO {
|
||||
}
|
||||
return new EntityListIterator(sqlP, modelEntity, selectFields, modelFieldTypeReader, this, whereEntityCondition, havingEntityCondition, findOptions.getDistinct());
|
||||
}
|
||||
|
||||
|
||||
protected StringBuilder makeConditionWhereString(ModelEntity modelEntity, EntityCondition whereEntityCondition, List<EntityCondition> viewWhereConditions, List<EntityConditionParam> whereEntityConditionParams) throws GenericEntityException {
|
||||
ModelViewEntity modelViewEntity = null;
|
||||
if (modelEntity instanceof ModelViewEntity) {
|
||||
modelViewEntity = (ModelViewEntity) modelEntity;
|
||||
}
|
||||
|
||||
|
||||
String entityCondWhereString = "";
|
||||
if (whereEntityCondition != null) {
|
||||
entityCondWhereString = whereEntityCondition.makeWhereString(modelEntity, whereEntityConditionParams, this.datasourceInfo);
|
||||
@@ -790,7 +790,7 @@ public class GenericDAO {
|
||||
whereString.append(entityCondWhereString);
|
||||
if (addParens) whereString.append(")");
|
||||
}
|
||||
|
||||
|
||||
if (UtilValidate.isNotEmpty(viewEntityCondWhereString)) {
|
||||
if (whereString.length() > 0) whereString.append(" AND ");
|
||||
boolean addParens = false;
|
||||
@@ -808,21 +808,21 @@ public class GenericDAO {
|
||||
whereString.append(viewClause);
|
||||
if (addParens) whereString.append(")");
|
||||
}
|
||||
|
||||
|
||||
return whereString;
|
||||
}
|
||||
|
||||
|
||||
protected StringBuilder makeConditionHavingString(ModelEntity modelEntity, EntityCondition havingEntityCondition, List<EntityCondition> viewHavingConditions, List<EntityConditionParam> havingEntityConditionParams) throws GenericEntityException {
|
||||
ModelViewEntity modelViewEntity = null;
|
||||
if (modelEntity instanceof ModelViewEntity) {
|
||||
modelViewEntity = (ModelViewEntity) modelEntity;
|
||||
}
|
||||
|
||||
|
||||
String entityCondHavingString = "";
|
||||
if (havingEntityCondition != null) {
|
||||
entityCondHavingString = havingEntityCondition.makeWhereString(modelEntity, havingEntityConditionParams, this.datasourceInfo);
|
||||
}
|
||||
|
||||
|
||||
String viewEntityCondHavingString = null;
|
||||
if (modelViewEntity != null) {
|
||||
EntityCondition viewHavingEntityCondition = EntityCondition.makeCondition(viewHavingConditions);
|
||||
@@ -847,7 +847,7 @@ public class GenericDAO {
|
||||
havingString.append(viewEntityCondHavingString);
|
||||
if (addParens) havingString.append(")");
|
||||
}
|
||||
|
||||
|
||||
return havingString;
|
||||
}
|
||||
|
||||
|
||||
@@ -211,7 +211,7 @@ public class EntityFinderUtil {
|
||||
value = StringUtil.split((String)value, delim);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (modelEntity.getField(fieldName) == null) {
|
||||
throw new IllegalArgumentException("Error in Entity Find: could not find field [" + fieldName + "] in entity with name [" + modelEntity.getEntityName() + "]");
|
||||
}
|
||||
|
||||
@@ -237,7 +237,7 @@ public abstract class ListFinder extends Finder {
|
||||
throw new GeneralException(errMsg, e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public List<String> getOrderByFieldList(Map<String, Object> context) {
|
||||
List<String> orderByFields = EntityFinderUtil.makeOrderByFieldList(this.orderByExpanderList, context);
|
||||
return orderByFields;
|
||||
|
||||
@@ -177,10 +177,10 @@ public class SqlJdbcUtil {
|
||||
if (condBuffer.length() == 0) {
|
||||
throw new GenericModelException("No view-link/join key-maps found for the " + viewLink.getEntityAlias() + " and the " + viewLink.getRelEntityAlias() + " member-entities of the " + modelViewEntity.getEntityName() + " view-entity.");
|
||||
}
|
||||
|
||||
|
||||
// TODO add expression from entity-condition on view-link
|
||||
|
||||
|
||||
|
||||
|
||||
restOfStatement.append(condBuffer.toString());
|
||||
|
||||
// don't put ending parenthesis
|
||||
@@ -540,7 +540,7 @@ public class SqlJdbcUtil {
|
||||
}
|
||||
|
||||
// ------------------------------------------
|
||||
|
||||
|
||||
String fieldType = mft.getJavaType();
|
||||
|
||||
try {
|
||||
|
||||
@@ -57,7 +57,7 @@ public class ModelFieldType implements Serializable {
|
||||
|
||||
/** The sql-type-alias of the Field, this is optional */
|
||||
protected String sqlTypeAlias = null;
|
||||
|
||||
|
||||
protected Converter<?, ?> sqlToJavaConverter = null;
|
||||
|
||||
/** validators to be called when an update is done */
|
||||
@@ -137,7 +137,7 @@ public class ModelFieldType implements Serializable {
|
||||
}
|
||||
|
||||
/** Sets the SQL <code>Class</code> for this field.
|
||||
*
|
||||
*
|
||||
* @param sqlClass
|
||||
*/
|
||||
public synchronized void setSqlClass(Class<?> sqlClass) {
|
||||
|
||||
@@ -93,7 +93,7 @@ public class ModelViewEntity extends ModelEntity {
|
||||
protected List<String> groupByFields = FastList.newInstance();
|
||||
|
||||
protected Map<String, Map<String, ModelConversion>> conversions = FastMap.newInstance();
|
||||
|
||||
|
||||
protected ViewEntityCondition viewEntityCondition = null;
|
||||
|
||||
public ModelViewEntity(ModelReader reader, Element entityElement, UtilTimer utilTimer, ModelInfo def) {
|
||||
@@ -134,7 +134,7 @@ public class ModelViewEntity extends ModelEntity {
|
||||
|
||||
if (utilTimer != null) utilTimer.timerString(" createModelEntity: before relations");
|
||||
this.populateRelated(reader, entityElement);
|
||||
|
||||
|
||||
Element entityConditionElement = UtilXml.firstChildElement(entityElement, "entity-condition");
|
||||
if (entityConditionElement != null) {
|
||||
this.viewEntityCondition = new ViewEntityCondition(this, null, entityConditionElement);
|
||||
@@ -290,26 +290,26 @@ public class ModelViewEntity extends ModelEntity {
|
||||
public void addViewLink(ModelViewLink viewLink) {
|
||||
this.viewLinks.add(viewLink);
|
||||
}
|
||||
|
||||
|
||||
public void populateViewEntityConditionInformation(ModelFieldTypeReader modelFieldTypeReader, List<EntityCondition> whereConditions, List<EntityCondition> havingConditions, List<String> orderByList, List<String> entityAliasStack) {
|
||||
if (entityAliasStack == null) {
|
||||
entityAliasStack = FastList.newInstance();
|
||||
}
|
||||
|
||||
|
||||
if (this.viewEntityCondition != null) {
|
||||
EntityCondition whereCondition = this.viewEntityCondition.getWhereCondition(modelFieldTypeReader, entityAliasStack);
|
||||
if (whereCondition != null) {
|
||||
whereConditions.add(whereCondition);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (this.viewEntityCondition != null) {
|
||||
EntityCondition havingCondition = this.viewEntityCondition.getHavingCondition(modelFieldTypeReader, entityAliasStack);
|
||||
if (havingCondition != null) {
|
||||
havingConditions.add(havingCondition);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// add the current one first so it overrides the lower level ones
|
||||
if (this.viewEntityCondition != null) {
|
||||
List<String> currentOrderByList = this.viewEntityCondition.getOrderByList();
|
||||
@@ -317,7 +317,7 @@ public class ModelViewEntity extends ModelEntity {
|
||||
orderByList.addAll(currentOrderByList);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for (Map.Entry<String, ModelEntity> memberEntityEntry: this.memberModelEntities.entrySet()) {
|
||||
if (memberEntityEntry.getValue() instanceof ModelViewEntity) {
|
||||
ModelViewEntity memberViewEntity = (ModelViewEntity) memberEntityEntry.getValue();
|
||||
@@ -1145,7 +1145,7 @@ public class ModelViewEntity extends ModelEntity {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static class ViewEntityCondition {
|
||||
protected ModelViewEntity modelViewEntity;
|
||||
protected ModelViewLink modelViewLink;
|
||||
@@ -1168,7 +1168,7 @@ public class ModelViewEntity extends ModelEntity {
|
||||
orderByList.add(orderByElement.getAttribute("field-name"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Element conditionExprElement = UtilXml.firstChildElement(element, "condition-expr");
|
||||
Element conditionListElement = UtilXml.firstChildElement(element, "condition-list");
|
||||
if (conditionExprElement != null) {
|
||||
@@ -1182,11 +1182,11 @@ public class ModelViewEntity extends ModelEntity {
|
||||
this.havingCondition = new ViewConditionList(this, havingConditionListElement);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public List<String> getOrderByList() {
|
||||
return this.orderByList;
|
||||
}
|
||||
|
||||
|
||||
public EntityCondition getWhereCondition(ModelFieldTypeReader modelFieldTypeReader, List<String> entityAliasStack) {
|
||||
if (this.whereCondition != null) {
|
||||
return this.whereCondition.createCondition(modelFieldTypeReader, entityAliasStack);
|
||||
@@ -1194,7 +1194,7 @@ public class ModelViewEntity extends ModelEntity {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public EntityCondition getHavingCondition(ModelFieldTypeReader modelFieldTypeReader, List<String> entityAliasStack) {
|
||||
if (this.havingCondition != null) {
|
||||
return this.havingCondition.createCondition(modelFieldTypeReader, entityAliasStack);
|
||||
@@ -1207,7 +1207,7 @@ public class ModelViewEntity extends ModelEntity {
|
||||
public static interface ViewCondition extends Serializable {
|
||||
public EntityCondition createCondition(ModelFieldTypeReader modelFieldTypeReader, List<String> entityAliasStack);
|
||||
}
|
||||
|
||||
|
||||
public static class ViewConditionExpr implements ViewCondition {
|
||||
protected ViewEntityCondition viewEntityCondition;
|
||||
protected String entityAlias;
|
||||
@@ -1228,7 +1228,7 @@ public class ModelViewEntity extends ModelEntity {
|
||||
this.relFieldName = conditionExprElement.getAttribute("rel-field-name");
|
||||
this.value = conditionExprElement.getAttribute("value");
|
||||
this.ignoreCase = "true".equals(conditionExprElement.getAttribute("ignore-case"));
|
||||
|
||||
|
||||
// if we are in a view-link, default to the entity-alias and rel-entity-alias there
|
||||
if (this.viewEntityCondition.modelViewLink != null) {
|
||||
if (UtilValidate.isEmpty(this.entityAlias)) {
|
||||
@@ -1239,7 +1239,7 @@ public class ModelViewEntity extends ModelEntity {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public EntityCondition createCondition(ModelFieldTypeReader modelFieldTypeReader, List<String> entityAliasStack) {
|
||||
EntityOperator<?,?,?> operator = EntityOperator.lookup(this.operator);
|
||||
if (operator == null) {
|
||||
@@ -1259,7 +1259,7 @@ public class ModelViewEntity extends ModelEntity {
|
||||
value = StringUtil.split((String) value, delim);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (this.viewEntityCondition.modelViewEntity.getField(fieldName) == null) {
|
||||
throw new IllegalArgumentException("Error in Entity Find: could not find field [" + fieldName + "] in entity with name [" + this.viewEntityCondition.modelViewEntity.getEntityName() + "]");
|
||||
}
|
||||
@@ -1272,7 +1272,7 @@ public class ModelViewEntity extends ModelEntity {
|
||||
}
|
||||
|
||||
if (Debug.verboseOn()) Debug.logVerbose("Got value for fieldName [" + fieldName + "]: " + value, module);
|
||||
|
||||
|
||||
EntityConditionValue lhs = EntityFieldValue.makeFieldValue(this.fieldName, this.entityAlias, entityAliasStack, this.viewEntityCondition.modelViewEntity);
|
||||
Object rhs = null;
|
||||
if (value != null) {
|
||||
@@ -1280,7 +1280,7 @@ public class ModelViewEntity extends ModelEntity {
|
||||
} else {
|
||||
rhs = EntityFieldValue.makeFieldValue(this.relFieldName, this.relEntityAlias, entityAliasStack, this.viewEntityCondition.modelViewEntity);
|
||||
}
|
||||
|
||||
|
||||
if (operator.equals(EntityOperator.NOT_EQUAL) && value != null) {
|
||||
// since some databases don't consider nulls in != comparisons, explicitly include them
|
||||
// this makes more sense logically, but if anyone ever needs it to not behave this way we should add an "or-null" attribute that is true by default
|
||||
|
||||
@@ -34,7 +34,7 @@ public class EntityTestCase extends TestCase {
|
||||
public void setDelegator(Delegator delegator) {
|
||||
this.delegator = delegator;
|
||||
}
|
||||
|
||||
|
||||
public Delegator getDelegator() {
|
||||
return delegator;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user