org.ofbiz.entity
Class GenericEntity

java.lang.Object
  extended by java.util.Observable
      extended by org.ofbiz.entity.GenericEntity
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:
GenericEntity.NullGenericEntity, GenericPK, GenericValue

public class GenericEntity
extends java.util.Observable
implements java.util.Map<java.lang.String,java.lang.Object>, LocalizedMap, java.io.Serializable, java.lang.Comparable<GenericEntity>, java.lang.Cloneable

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

Note that this class extends Observable to achieve change notification for Observers. Whenever a field changes the name of the field will be passed to the notifyObservers() method, and through that to the update() method of each Observer.

See Also:
Serialized Form

Nested Class Summary
static interface GenericEntity.NULL
           
static class GenericEntity.NullField
           
static class GenericEntity.NullGenericEntity
           
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Field Summary
protected  int cachedHashCode
           
protected  java.lang.String delegatorName
          Name of the GenericDelegator, used to re-get the GenericDelegator when deserialized
protected  java.lang.String entityName
          Contains the entityName of this entity, necessary for efficiency when creating EJBs
protected  java.util.Map<java.lang.String,java.lang.Object> fields
          Contains the fields for this entity.
protected  boolean generateHashCode
           
protected  GenericDelegator internalDelegator
          Reference to an instance of GenericDelegator used to do some basic operations on this entity value.
protected  boolean isFromEntitySync
          This is an internal field used to specify that a value has come from a sync process and that the auto-stamps should not be over-written
protected  ModelEntity modelEntity
          Contains the ModelEntity instance that represents the definition of this entity, not to be serialized
protected  boolean modified
          Denotes whether or not this entity has been modified, or is known to be out of sync with the persistent record
static java.lang.String module
           
protected  boolean mutable
          Used to specify whether or not this representation of the entity can be changed; generally cleared when this object comes from a cache
static GenericEntity NULL_ENTITY
           
static GenericEntity.NullField NULL_FIELD
           
 
Constructor Summary
protected GenericEntity()
          Creates new GenericEntity - Should never be used, prefer the other options.
 
Method Summary
static int addToXmlDocument(java.util.Collection<GenericValue> values, org.w3c.dom.Document document)
           
static int addToXmlElement(java.util.Collection<GenericValue> values, org.w3c.dom.Document document, org.w3c.dom.Element element)
           
 void clear()
           
 java.lang.Object clone()
          Clones this GenericEntity, this is a shallow clone & uses the default shallow HashMap clone
 int compareTo(GenericEntity that)
          Compares this GenericEntity to the passed object
protected  int compareToFields(GenericEntity that, java.lang.String name)
           
 boolean containsKey(java.lang.Object key)
           
 boolean containsPrimaryKey()
          Returns true if the entity contains all of the primary key fields.
 boolean containsPrimaryKey(boolean requireValue)
           
 boolean containsValue(java.lang.Object value)
           
static GenericEntity createGenericEntity(GenericEntity value)
          Copy Factory Method: Creates new GenericEntity from existing GenericEntity
static GenericEntity createGenericEntity(ModelEntity modelEntity)
          Creates new GenericEntity
static GenericEntity createGenericEntity(ModelEntity modelEntity, java.util.Map<java.lang.String,? extends java.lang.Object> fields)
          Creates new GenericEntity from existing Map
 java.lang.Object dangerousGetNoCheckButFast(ModelField modelField)
           
 void dangerousSetNoCheckButFast(ModelField modelField, java.lang.Object value)
           
 java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.Object>> entrySet()
           
 boolean equals(java.lang.Object obj)
          Determines the equality of two GenericEntity objects, overrides the default equals
 java.lang.Object get(java.lang.Object key)
           
 java.lang.Object get(java.lang.String name)
           
 java.lang.Object get(java.lang.String name, java.util.Locale locale)
          Checks a resource bundle for a value for this field using the entity name, the field name and a composite of the Primary Key field values as a key.
 java.lang.Object get(java.lang.String name, java.lang.String resource, java.util.Locale locale)
          Same as the getResource method that does not take resource name, but instead allows manually specifying the resource name.
 java.util.Map<java.lang.String,java.lang.Object> getAllFields()
          Returns key/value pairs of entity fields
 java.util.Collection<java.lang.String> getAllKeys()
          Returns keys of entity fields
 java.math.BigDecimal getBigDecimal(java.lang.String name)
           
 java.lang.Boolean getBoolean(java.lang.String name)
           
 byte[] getBytes(java.lang.String name)
           
 java.sql.Date getDate(java.lang.String name)
           
 GenericDelegator getDelegator()
          Get the GenericDelegator instance that created this value object and that is responsible for it.
 java.lang.Double getDouble(java.lang.String name)
           
 java.lang.String getEntityName()
           
 java.util.Map<java.lang.String,java.lang.Object> getFields(java.util.Collection<java.lang.String> keysofFields)
          Used by clients to specify exactly the fields they are interested in
 java.lang.Float getFloat(java.lang.String name)
           
 java.lang.Integer getInteger(java.lang.String name)
           
 boolean getIsFromEntitySync()
           
 java.lang.Long getLong(java.lang.String name)
           
 ModelEntity getModelEntity()
           
 java.lang.String getPkShortValueString()
           
 GenericPK getPrimaryKey()
           
 java.lang.String getString(java.lang.String name)
           
 java.sql.Time getTime(java.lang.String name)
           
 java.sql.Timestamp getTimestamp(java.lang.String name)
           
 int hashCode()
          Creates a hashCode for the entity, using the default String hashCode and Map hashCode, overrides the default hashCode
protected  void init(GenericEntity value)
          Copy Constructor: Creates new GenericEntity from existing GenericEntity
protected  void init(ModelEntity modelEntity)
          Creates new GenericEntity
protected  void init(ModelEntity modelEntity, java.util.Map<java.lang.String,? extends java.lang.Object> fields)
          Creates new GenericEntity from existing Map
protected  void init(ModelEntity modelEntity, java.lang.Object singlePkValue)
          Creates new GenericEntity from existing Map
 boolean isEmpty()
           
 boolean isModified()
           
 boolean isMutable()
           
 boolean isPrimaryKey()
          Returns true if the entity contains all of the primary key fields, but NO others.
 boolean isPrimaryKey(boolean requireValue)
           
 java.util.Set<java.lang.String> keySet()
           
 boolean lockEnabled()
          Used to indicate if locking is enabled for this entity
static org.w3c.dom.Document makeXmlDocument(java.util.Collection<GenericValue> values)
           
 org.w3c.dom.Element makeXmlElement(org.w3c.dom.Document document)
          Makes an XML Element object with an attribute for each field of the entity
 org.w3c.dom.Element makeXmlElement(org.w3c.dom.Document document, java.lang.String prefix)
          Makes an XML Element object with an attribute for each field of the entity
 boolean matches(EntityCondition condition)
           
 boolean matchesFields(java.util.Map<java.lang.String,? extends java.lang.Object> keyValuePairs)
           
 java.lang.Object put(java.lang.String key, java.lang.Object value)
           
 void putAll(java.util.Map<? extends java.lang.String,? extends java.lang.Object> map)
           
 void refreshFromValue(GenericEntity newValue)
           
 java.lang.Object remove(java.lang.Object key)
           
 void removedFromDatasource()
           
 void reset()
           
 void set(java.lang.String name, java.lang.Object value)
          Sets the named field to the passed value, even if the value is null
 java.lang.Object set(java.lang.String name, java.lang.Object value, boolean setIfNull)
          Sets the named field to the passed value.
 void setAllFields(java.util.Map<? extends java.lang.Object,? extends java.lang.Object> fields, boolean setIfEmpty, java.lang.String namePrefix, java.lang.Boolean pks)
          Intelligently sets fields on this entity from the Map of fields passed in
 void setBytes(java.lang.String name, byte[] bytes)
          Sets a field with an array of bytes, wrapping them automatically for easy use.
 void setDelegator(GenericDelegator internalDelegator)
          Set the GenericDelegator instance that created this value object and that is responsible for it.
 void setFields(java.util.Map<? extends java.lang.String,? extends java.lang.Object> keyValuePairs)
          Used by clients to update particular fields in the entity
 void setImmutable()
           
 void setIsFromEntitySync(boolean isFromEntitySync)
           
 void setNextSeqId()
           
 void setNonPKFields(java.util.Map<? extends java.lang.Object,? extends java.lang.Object> fields)
          go through the non-pks and for each one see if there is an entry in fields to set
 void setNonPKFields(java.util.Map<? extends java.lang.Object,? extends java.lang.Object> fields, boolean setIfEmpty)
          go through the non-pks and for each one see if there is an entry in fields to set
 void setPKFields(java.util.Map<? extends java.lang.Object,? extends java.lang.Object> fields)
          go through the pks and for each one see if there is an entry in fields to set
 void setPKFields(java.util.Map<? extends java.lang.Object,? extends java.lang.Object> fields, boolean setIfEmpty)
          go through the pks and for each one see if there is an entry in fields to set
 void setString(java.lang.String name, java.lang.String value)
          Sets the named field to the passed value, converting the value from a String to the corrent type using Type.valueOf()
 int size()
           
 void synchronizedWithDatasource()
           
 java.lang.String toString()
          Creates a String for the entity, overrides the default toString This method is secure, it will not display encrypted fields
 java.lang.String toStringInsecure()
          Creates a String for the entity, overrides the default toString This method is NOT secure, it WILL display encrypted fields
 java.util.Collection<java.lang.Object> values()
           
 void writeXmlText(java.io.PrintWriter writer, java.lang.String prefix)
          Writes XML text with an attribute or CDATA element for each field of the entity
 
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

module

public static final java.lang.String module

NULL_ENTITY

public static final GenericEntity NULL_ENTITY

NULL_FIELD

public static final GenericEntity.NullField NULL_FIELD

delegatorName

protected java.lang.String delegatorName
Name of the GenericDelegator, used to re-get the GenericDelegator when deserialized


internalDelegator

protected transient GenericDelegator internalDelegator
Reference to an instance of GenericDelegator used to do some basic operations on this entity value. If null various methods in this class will fail. This is automatically set by the GenericDelegator for all GenericValue objects instantiated through it. You may set this manually for objects you instantiate manually, but it is optional.


fields

protected java.util.Map<java.lang.String,java.lang.Object> fields
Contains the fields for this entity. Note that this should always be a HashMap to allow for two things: non-synchronized reads (synchronized writes are done through synchronized setters) and being able to store null values. Null values are important because with them we can distinguish between desiring to set a value to null and desiring to not modify the current value on an update.


entityName

protected java.lang.String entityName
Contains the entityName of this entity, necessary for efficiency when creating EJBs


modelEntity

protected transient ModelEntity modelEntity
Contains the ModelEntity instance that represents the definition of this entity, not to be serialized


modified

protected boolean modified
Denotes whether or not this entity has been modified, or is known to be out of sync with the persistent record


generateHashCode

protected boolean generateHashCode

cachedHashCode

protected int cachedHashCode

mutable

protected boolean mutable
Used to specify whether or not this representation of the entity can be changed; generally cleared when this object comes from a cache


isFromEntitySync

protected boolean isFromEntitySync
This is an internal field used to specify that a value has come from a sync process and that the auto-stamps should not be over-written

Constructor Detail

GenericEntity

protected GenericEntity()
Creates new GenericEntity - Should never be used, prefer the other options.

Method Detail

createGenericEntity

public static GenericEntity createGenericEntity(ModelEntity modelEntity)
Creates new GenericEntity


createGenericEntity

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


createGenericEntity

public static GenericEntity createGenericEntity(GenericEntity value)
Copy Factory Method: Creates new GenericEntity from existing GenericEntity


init

protected void init(ModelEntity modelEntity)
Creates new GenericEntity


init

protected void init(ModelEntity modelEntity,
                    java.util.Map<java.lang.String,? extends java.lang.Object> fields)
Creates new GenericEntity from existing Map


init

protected void init(ModelEntity modelEntity,
                    java.lang.Object singlePkValue)
Creates new GenericEntity from existing Map


init

protected void init(GenericEntity value)
Copy Constructor: Creates new GenericEntity from existing GenericEntity


reset

public void reset()

refreshFromValue

public void refreshFromValue(GenericEntity newValue)
                      throws GenericEntityException
Throws:
GenericEntityException

isModified

public boolean isModified()

synchronizedWithDatasource

public void synchronizedWithDatasource()

removedFromDatasource

public void removedFromDatasource()

isMutable

public boolean isMutable()

setImmutable

public void setImmutable()

getIsFromEntitySync

public boolean getIsFromEntitySync()
Returns:
Returns the isFromEntitySync.

setIsFromEntitySync

public void setIsFromEntitySync(boolean isFromEntitySync)
Parameters:
isFromEntitySync - The isFromEntitySync to set.

getEntityName

public java.lang.String getEntityName()

getModelEntity

public ModelEntity getModelEntity()

getDelegator

public GenericDelegator getDelegator()
Get the GenericDelegator instance that created this value object and that is responsible for it.

Returns:
GenericDelegator object

setDelegator

public void setDelegator(GenericDelegator internalDelegator)
Set the GenericDelegator instance that created this value object and that is responsible for it.


get

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

isPrimaryKey

public boolean isPrimaryKey()
Returns true if the entity contains all of the primary key fields, but NO others.


isPrimaryKey

public boolean isPrimaryKey(boolean requireValue)

containsPrimaryKey

public boolean containsPrimaryKey()
Returns true if the entity contains all of the primary key fields.


containsPrimaryKey

public boolean containsPrimaryKey(boolean requireValue)

getPkShortValueString

public java.lang.String getPkShortValueString()

set

public void set(java.lang.String name,
                java.lang.Object value)
Sets the named field to the passed value, even if the value is null

Parameters:
name - The field name to set
value - The value to set

set

public java.lang.Object set(java.lang.String name,
                            java.lang.Object value,
                            boolean setIfNull)
Sets the named field to the passed value. If value is null, it is only set if the setIfNull parameter is true. This is useful because an update will only set values that are included in the HashMap and will store null values in the HashMap to the datastore. If a value is not in the HashMap, it will be left unmodified in the datastore.

Parameters:
name - The field name to set
value - The value to set
setIfNull - Specifies whether or not to set the value if it is null

dangerousSetNoCheckButFast

public void dangerousSetNoCheckButFast(ModelField modelField,
                                       java.lang.Object value)

dangerousGetNoCheckButFast

public java.lang.Object dangerousGetNoCheckButFast(ModelField modelField)

setString

public void setString(java.lang.String name,
                      java.lang.String value)
Sets the named field to the passed value, converting the value from a String to the corrent type using Type.valueOf()

Parameters:
name - The field name to set
value - The String value to convert and set

setBytes

public void setBytes(java.lang.String name,
                     byte[] bytes)
Sets a field with an array of bytes, wrapping them automatically for easy use.

Parameters:
name - The field name to set
bytes - The byte array to be wrapped and set

setNextSeqId

public void setNextSeqId()

getBoolean

public java.lang.Boolean getBoolean(java.lang.String name)

getString

public java.lang.String getString(java.lang.String name)

getTimestamp

public java.sql.Timestamp getTimestamp(java.lang.String name)

getTime

public java.sql.Time getTime(java.lang.String name)

getDate

public java.sql.Date getDate(java.lang.String name)

getInteger

public java.lang.Integer getInteger(java.lang.String name)

getLong

public java.lang.Long getLong(java.lang.String name)

getFloat

public java.lang.Float getFloat(java.lang.String name)

getDouble

public java.lang.Double getDouble(java.lang.String name)

getBigDecimal

public java.math.BigDecimal getBigDecimal(java.lang.String name)

getBytes

public byte[] getBytes(java.lang.String name)

get

public java.lang.Object get(java.lang.String name,
                            java.util.Locale locale)
Checks a resource bundle for a value for this field using the entity name, the field name and a composite of the Primary Key field values as a key. If no value is found in the resource then the field value is returned. Uses the default-resource-name from the entity definition as the resource name. To specify a resource name manually, use the other getResource method. So, the key in the resource bundle (properties file) should be as follows: ...... For example: ProductType.description.FINISHED_GOOD

Specified by:
get in interface LocalizedMap
Parameters:
name - The name of the field on the entity
locale - The locale to use when finding the ResourceBundle, if null uses the default locale for the current instance of Java
Returns:
If the corresponding resource is found and contains a key as described above, then that property value is returned; otherwise returns the field value

get

public java.lang.Object get(java.lang.String name,
                            java.lang.String resource,
                            java.util.Locale locale)
Same as the getResource method that does not take resource name, but instead allows manually specifying the resource name. In general you should use the other method for more consistent naming and use of the corresponding properties files.

Parameters:
name - The name of the field on the entity
resource - The name of the resource to get the value from; if null defaults to the default-resource-name on the entity definition, if specified there
locale - The locale to use when finding the ResourceBundle, if null uses the default locale for the current instance of Java
Returns:
If the specified resource is found and contains a key as described above, then that property value is returned; otherwise returns the field value

getPrimaryKey

public GenericPK getPrimaryKey()

setPKFields

public void setPKFields(java.util.Map<? extends java.lang.Object,? extends java.lang.Object> fields)
go through the pks and for each one see if there is an entry in fields to set


setPKFields

public void setPKFields(java.util.Map<? extends java.lang.Object,? extends java.lang.Object> fields,
                        boolean setIfEmpty)
go through the pks and for each one see if there is an entry in fields to set


setNonPKFields

public void setNonPKFields(java.util.Map<? extends java.lang.Object,? extends java.lang.Object> fields)
go through the non-pks and for each one see if there is an entry in fields to set


setNonPKFields

public void setNonPKFields(java.util.Map<? extends java.lang.Object,? extends java.lang.Object> fields,
                           boolean setIfEmpty)
go through the non-pks and for each one see if there is an entry in fields to set


setAllFields

public void setAllFields(java.util.Map<? extends java.lang.Object,? extends java.lang.Object> fields,
                         boolean setIfEmpty,
                         java.lang.String namePrefix,
                         java.lang.Boolean pks)
Intelligently sets fields on this entity from the Map of fields passed in

Parameters:
fields - The fields Map to get the values from
setIfEmpty - Used to specify whether empty/null values in the field Map should over-write non-empty values in this entity
namePrefix - If not null or empty will be pre-pended to each field name (upper-casing the first letter of the field name first), and that will be used as the fields Map lookup name instead of the field-name
pks - If null, get all values, if TRUE just get PKs, if FALSE just get non-PKs

getAllKeys

public java.util.Collection<java.lang.String> getAllKeys()
Returns keys of entity fields

Returns:
java.util.Collection

getAllFields

public java.util.Map<java.lang.String,java.lang.Object> getAllFields()
Returns key/value pairs of entity fields

Returns:
java.util.Map

getFields

public java.util.Map<java.lang.String,java.lang.Object> getFields(java.util.Collection<java.lang.String> keysofFields)
Used by clients to specify exactly the fields they are interested in

Parameters:
keysofFields - the name of the fields the client is interested in
Returns:
java.util.Map

setFields

public void setFields(java.util.Map<? extends java.lang.String,? extends java.lang.Object> keyValuePairs)
Used by clients to update particular fields in the entity

Parameters:
keyValuePairs - java.util.Map

matchesFields

public boolean matchesFields(java.util.Map<java.lang.String,? extends java.lang.Object> keyValuePairs)

lockEnabled

public boolean lockEnabled()
Used to indicate if locking is enabled for this entity

Returns:
True if locking is enabled

makeXmlDocument

public static org.w3c.dom.Document makeXmlDocument(java.util.Collection<GenericValue> values)

addToXmlDocument

public static int addToXmlDocument(java.util.Collection<GenericValue> values,
                                   org.w3c.dom.Document document)

addToXmlElement

public static int addToXmlElement(java.util.Collection<GenericValue> values,
                                  org.w3c.dom.Document document,
                                  org.w3c.dom.Element element)

makeXmlElement

public org.w3c.dom.Element makeXmlElement(org.w3c.dom.Document document)
Makes an XML Element object with an attribute for each field of the entity

Parameters:
document - The XML Document that the new Element will be part of
Returns:
org.w3c.dom.Element object representing this generic entity

makeXmlElement

public org.w3c.dom.Element makeXmlElement(org.w3c.dom.Document document,
                                          java.lang.String prefix)
Makes an XML Element object with an attribute for each field of the entity

Parameters:
document - The XML Document that the new Element will be part of
prefix - A prefix to put in front of the entity name in the tag name
Returns:
org.w3c.dom.Element object representing this generic entity

writeXmlText

public void writeXmlText(java.io.PrintWriter writer,
                         java.lang.String prefix)
Writes XML text with an attribute or CDATA element for each field of the entity

Parameters:
writer - A PrintWriter to write to
prefix - A prefix to put in front of the entity name in the tag name

equals

public boolean equals(java.lang.Object obj)
Determines the equality of two GenericEntity objects, overrides the default equals

Specified by:
equals in interface java.util.Map<java.lang.String,java.lang.Object>
Overrides:
equals in class java.lang.Object
Parameters:
obj - The object (GenericEntity) to compare this two
Returns:
boolean stating if the two objects are equal

hashCode

public int hashCode()
Creates a hashCode for the entity, using the default String hashCode and Map hashCode, overrides the default hashCode

Specified by:
hashCode in interface java.util.Map<java.lang.String,java.lang.Object>
Overrides:
hashCode in class java.lang.Object
Returns:
Hashcode corresponding to this entity

toString

public java.lang.String toString()
Creates a String for the entity, overrides the default toString This method is secure, it will not display encrypted fields

Overrides:
toString in class java.lang.Object
Returns:
String corresponding to this entity

toStringInsecure

public java.lang.String toStringInsecure()
Creates a String for the entity, overrides the default toString This method is NOT secure, it WILL display encrypted fields

Returns:
String corresponding to this entity

compareToFields

protected int compareToFields(GenericEntity that,
                              java.lang.String name)

compareTo

public int compareTo(GenericEntity that)
Compares this GenericEntity to the passed object

Specified by:
compareTo in interface java.lang.Comparable<GenericEntity>
Parameters:
that - Object to compare this to
Returns:
int representing the result of the comparison (-1,0, or 1)

clone

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

Overrides:
clone in class java.lang.Object
Returns:
Object that is a clone of this GenericEntity

remove

public java.lang.Object remove(java.lang.Object key)
Specified by:
remove in interface java.util.Map<java.lang.String,java.lang.Object>

containsKey

public boolean containsKey(java.lang.Object key)
Specified by:
containsKey in interface java.util.Map<java.lang.String,java.lang.Object>

entrySet

public java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.Object>> entrySet()
Specified by:
entrySet in interface java.util.Map<java.lang.String,java.lang.Object>

put

public java.lang.Object put(java.lang.String key,
                            java.lang.Object value)
Specified by:
put in interface java.util.Map<java.lang.String,java.lang.Object>

putAll

public void putAll(java.util.Map<? extends java.lang.String,? extends java.lang.Object> map)
Specified by:
putAll in interface java.util.Map<java.lang.String,java.lang.Object>

clear

public void clear()
Specified by:
clear in interface java.util.Map<java.lang.String,java.lang.Object>

get

public java.lang.Object get(java.lang.Object key)
Specified by:
get in interface java.util.Map<java.lang.String,java.lang.Object>

keySet

public java.util.Set<java.lang.String> keySet()
Specified by:
keySet in interface java.util.Map<java.lang.String,java.lang.Object>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface java.util.Map<java.lang.String,java.lang.Object>

values

public java.util.Collection<java.lang.Object> values()
Specified by:
values in interface java.util.Map<java.lang.String,java.lang.Object>

containsValue

public boolean containsValue(java.lang.Object value)
Specified by:
containsValue in interface java.util.Map<java.lang.String,java.lang.Object>

size

public int size()
Specified by:
size in interface java.util.Map<java.lang.String,java.lang.Object>

matches

public boolean matches(EntityCondition condition)