public class Person extends Entity {
public static final EntityType TYPE = new EntityType() {{
string(Thing.name);
string(Thing.description);
}};
{
setEntityType(TYPE);
}
}
public interface Entity extends EntityWrapper
Modifier and Type | Method and Description |
---|---|
void |
add(Property prop,
Entity value)
Adds an item to the given property.
|
void |
addPropertyChangeListener(ActionListener<PropertyChangeEvent> l)
Adds a listener to listen to all property changes on all properties.
|
void |
addPropertyChangeListener(Property property,
ActionListener<PropertyChangeEvent> l)
Adds a listener to be notified of changes to the given property.
|
void |
addVetoablePropertyChangeListener(ActionListener<VetoablePropertyChangeEvent> l)
Adds a listener to listen to all property changes on all properties.
|
void |
addVetoablePropertyChangeListener(Property property,
ActionListener<VetoablePropertyChangeEvent> l)
Adds a listener to be notified of changes to the given property.
|
<T> boolean |
as(Class<T> cls,
SuccessCallback<T> callback) |
Image |
createImageToFile(Property prop,
EncodedImage placeholder)
Creates an image for a given property to file system.
|
Image |
createImageToFile(Property prop,
EncodedImage placeholder,
String file)
Creates an image for a given property to file system.This behaves similarly to the
URLImage.createToFileSystem(com.codename1.ui.EncodedImage, java.lang.String, java.lang.String, com.codename1.ui.URLImage.ImageAdapter)
except the URL is retrieved from the entity’s property, instead of as a parameter. |
Image |
createImageToFile(Property prop,
EncodedImage placeholder,
String file,
URLImage.ImageAdapter adapter)
Creates an image for a given property to file system.This behaves similarly to the
URLImage.createToFileSystem(com.codename1.ui.EncodedImage, java.lang.String, java.lang.String, com.codename1.ui.URLImage.ImageAdapter)
except the URL is retrieved from the entity’s property, instead of as a parameter. |
Image |
createImageToFile(Property prop,
EncodedImage placeholder,
URLImage.ImageAdapter adapter)
Creates an image for a given property to file system.
|
Image |
createImageToFile(Tag tag,
EncodedImage placeholder)
Creates an image for a given property to file system.
|
Image |
createImageToFile(Tag tag,
EncodedImage placeholder,
String file)
Creates an image for a given property to file system.This behaves similarly to the
URLImage.createToFileSystem(com.codename1.ui.EncodedImage, java.lang.String, java.lang.String, com.codename1.ui.URLImage.ImageAdapter)
except the URL is retrieved from the entity’s property, instead of as a parameter. |
Image |
createImageToFile(Tag tag,
EncodedImage placeholder,
String file,
URLImage.ImageAdapter adapter)
Creates an image for a given property to file system.This behaves similarly to the
URLImage.createToFileSystem(com.codename1.ui.EncodedImage, java.lang.String, java.lang.String, com.codename1.ui.URLImage.ImageAdapter)
except the URL is retrieved from the entity’s property, instead of as a parameter. |
Image |
createImageToFile(Tag tag,
EncodedImage placeholder,
URLImage.ImageAdapter adapter)
Creates an image for a given property to file system.
|
Image |
createImageToStorage(Property prop,
EncodedImage placeholder)
Creates an image to storage on the given property.
|
Image |
createImageToStorage(Property prop,
EncodedImage placeholder,
String storageFile)
Creates an image to storage on the given property.This behaves similarly to the
URLImage.createToStorage(com.codename1.ui.EncodedImage, java.lang.String, java.lang.String)
except the URL is retrieved from the entity’s property, instead of as a parameter. |
Image |
createImageToStorage(Property prop,
EncodedImage placeholder,
String storageFile,
URLImage.ImageAdapter adapter)
Creates an image to storage on the given property.This behaves similarly to the
URLImage.createToStorage(com.codename1.ui.EncodedImage, java.lang.String, java.lang.String)
except the URL is retrieved from the entity’s property, instead of as a parameter. |
Image |
createImageToStorage(Property prop,
EncodedImage placeholder,
URLImage.ImageAdapter adapter)
Creates an image to storage on the given property.
|
Image |
createImageToStorage(Tag tag,
EncodedImage placeholder)
Creates an image to storage on the given property.
|
Image |
createImageToStorage(Tag tag,
EncodedImage placeholder,
String storageFile)
Creates an image for a given property to storage.
|
Image |
createImageToStorage(Tag tag,
EncodedImage placeholder,
String storageFile,
URLImage.ImageAdapter adapter)
Creates an image for a given property to storage.This behaves similarly to the
URLImage.createToStorage(com.codename1.ui.EncodedImage, java.lang.String, java.lang.String)
except the URL is retrieved from the entity’s property, instead of as a parameter. |
Image |
createImageToStorage(Tag tag,
EncodedImage placeholder,
URLImage.ImageAdapter adapter)
Creates an image for a given property to storage.
|
Property |
findProperty(Tag... tags)
Finds the property corresponding to the given tags.
|
Object |
get(Object key)
Gets a property value.
|
<T> T |
get(Property<T> prop)
Gets the value of the specified property.
|
<V> V |
get(Property prop,
ContentType<V> contentType)
Gets property value as given content type.
|
Aggregate |
getAggregate()
Gets the aggregate that this entity is a part of, or creates a new Aggregate with this entity as a its root.
|
<T> T |
getAs(Property prop,
Class<T> cls) |
<T> boolean |
getAs(Property prop,
Class<T> cls,
SuccessCallback<T> callback) |
<T> T |
getAs(Tag tag,
Class<T> cls) |
<T> boolean |
getAs(Tag tag,
Class<T> cls,
SuccessCallback<T> callback) |
Boolean |
getBoolean(Property prop)
Gets property value as Boolean.
|
Boolean |
getBoolean(Tag... tags)
Gets property value as Boolean.
|
Date |
getDate(Property prop)
Gets property as date
|
Date |
getDate(Tag... tags)
Gets property as date.
|
Double |
getDouble(Property prop)
Gets a property value as a Double.
|
Double |
getDouble(Tag... tags)
Gets property value as a Double.
|
BaseEntity |
getEntity() |
Entity |
getEntity(Property prop)
Gets the a property value as an Entity.
|
Entity |
getEntity(Tag... tag)
Gets the a property as an Entity.
|
EntityList |
getEntityList(Property prop)
Gets property as an EntityList
|
EntityList |
getEntityList(Tag... tag)
Gets a property as an EntityList.
|
EntityList |
getEntityListNonNull(Property prop)
Gets property as an EntityList.
|
Entity |
getEntityNonNull(Property prop)
Gets a property value as an Entity.
|
EntityType |
getEntityType()
Gets the entity type of this entity.
|
Integer |
getInt(Property prop)
Gets property value as Integer
|
Integer |
getInt(Tag... tags)
Gets property value as an Integer.
|
Long |
getLong(Property prop)
Gets property value as Long
|
Long |
getLong(Tag... tags)
Gets property value as a Long.
|
String |
getText(Property prop)
Gets a property as text.
|
String |
getText(Tag... tags)
Gets a property value as text.
|
boolean |
hasPropertyChangeListeners(Property prop) |
boolean |
hasVetoablePropertyChangeListeners(Property prop) |
boolean |
isEmpty(Property prop)
Checks if property is empty.
|
boolean |
isEmpty(Tag tag)
Checks if property is empty.
|
boolean |
isEntity(Property prop)
Checks if property is an Entity.
|
boolean |
isEntity(Tag tag)
Checks if property is an entity.
|
boolean |
isFalsey(Property prop)
Checks if property value is falsey.
|
boolean |
isFalsey(Tag tag)
Checks if property value is falsey.
|
void |
removePropertyChangeListener(ActionListener<PropertyChangeEvent> l)
Removes property change listener.
|
void |
removePropertyChangeListener(Property property,
ActionListener<PropertyChangeEvent> l)
Removes a property change listener.
|
void |
removeVetoablePropertyChangeListener(ActionListener<VetoablePropertyChangeEvent> l)
Removes property change listener.
|
void |
removeVetoablePropertyChangeListener(Property property,
ActionListener<VetoablePropertyChangeEvent> l)
Removes a property change listener.
|
boolean |
set(ContentType inputType,
Object val,
Tag... tags)
Sets the property value as the given content type.
|
void |
set(Object key,
Object value)
Sets a property value.
|
void |
set(Property prop,
ContentType inputType,
Object val)
Sets property as given content type.
|
boolean |
set(Tag tag,
ContentType inputType,
Object val)
Sets the property value as the given content type.
|
boolean |
setBoolean(boolean val,
Tag... tags)
Sets property as boolean.
|
void |
setBoolean(Property prop,
boolean val)
Sets property as boolean
|
boolean |
setBoolean(Tag tag,
boolean val)
Sets property as boolean.
|
void |
setChanged(Property prop,
boolean firePropertyChange)
Marks a property value as "changed".
|
boolean |
setDate(Date date,
Tag... tags)
Sets property as Date.
|
void |
setDate(Property prop,
Date date)
Sets property as Date
|
boolean |
setDate(Tag tag,
Date date)
Sets property as Date.
|
boolean |
setDouble(double val,
Tag... tags)
Sets property as double.
|
void |
setDouble(Property prop,
double val)
Sets property as Double
|
boolean |
setDouble(Tag tag,
double val)
Sets property as double.
|
boolean |
setEntity(Entity e,
Tag... tags)
Sets property as Entity.
|
void |
setEntity(Property prop,
Entity e)
Sets property as Entity
|
boolean |
setEntity(Tag tag,
Entity e)
Sets property as Entity.
|
void |
setEntityType(EntityType entityType)
Sets the entity type for this entity.
|
boolean |
setFloat(float val,
Tag... tags)
Sets property as float.
|
void |
setFloat(Property prop,
float val)
Sets property as Float
|
boolean |
setFloat(Tag tag,
float val)
Sets property as float.
|
boolean |
setInt(int val,
Tag... tags)
Sets property as int.
|
void |
setInt(Property prop,
int val)
Sets property as int
|
boolean |
setInt(Tag tag,
int val)
Sets property as int.
|
boolean |
setLong(long val,
Tag... tags)
Sets property as long.
|
void |
setLong(Property prop,
long val)
Sets property as Long
|
boolean |
setLong(Tag tag,
long val)
Sets property as long.
|
void |
setText(Property prop,
String text) |
boolean |
setText(String text,
Tag... tags)
Sets property as text
|
boolean |
setText(Tag tag,
String text)
Sets the given property as text.
|
Map |
toMap(Object... keys)
Converts the entity to a Map.
|
void add(Property prop, Entity value)
Adds an item to the given property. Assumes that the property value is an EntityList. If property is currently null, it will attempt to create an EntityList for the property, and add a value.
prop
- The property to set.value
- The entity to add to the property’s entity list.void addPropertyChangeListener(Property property, ActionListener<PropertyChangeEvent> l)
Adds a listener to be notified of changes to the given property.
property
- The property to listen on.l
- The listener.void addPropertyChangeListener(ActionListener<PropertyChangeEvent> l)
Adds a listener to listen to all property changes on all properties.
l
- The listener.void addVetoablePropertyChangeListener(Property property, ActionListener<VetoablePropertyChangeEvent> l)
Adds a listener to be notified of changes to the given property.
property
- The property to listen on.l
- The listener.void addVetoablePropertyChangeListener(ActionListener<VetoablePropertyChangeEvent> l)
Adds a listener to listen to all property changes on all properties.
l
- The listener.<T> boolean as(Class<T> cls, SuccessCallback<T> callback)
Image createImageToFile(Tag tag, EncodedImage placeholder, URLImage.ImageAdapter adapter)
Creates an image for a given property to file system. This behaves similarly to the URLImage.createToFileSystem(com.codename1.ui.EncodedImage, java.lang.String, java.lang.String, com.codename1.ui.URLImage.ImageAdapter)
except the URL is retrieved from the entity’s property, instead of as a parameter.
tag
- The tag used to look up the property to store.placeholder
- The placeholder image.adapter
- Adapter to manipulate the image when loading.Image createImageToFile(Property prop, EncodedImage placeholder, URLImage.ImageAdapter adapter)
Creates an image for a given property to file system. This behaves similarly to the URLImage.createToFileSystem(com.codename1.ui.EncodedImage, java.lang.String, java.lang.String, com.codename1.ui.URLImage.ImageAdapter)
except the URL is retrieved from the entity’s property, instead of as a parameter.
prop
- The property where the image url should be retrieved from.placeholder
- The placeholder image.adapter
- Adapter to manipulate the image when loading.Image createImageToFile(Tag tag, EncodedImage placeholder)
Creates an image for a given property to file system. This behaves similarly to the URLImage.createToFileSystem(com.codename1.ui.EncodedImage, java.lang.String, java.lang.String, com.codename1.ui.URLImage.ImageAdapter)
except the URL is retrieved from the entity’s property, instead of as a parameter.
tag
- The tag used to look up the property to store.placeholder
- The placeholder image.Image createImageToFile(Property prop, EncodedImage placeholder)
Creates an image for a given property to file system. This behaves similarly to the URLImage.createToFileSystem(com.codename1.ui.EncodedImage, java.lang.String, java.lang.String, com.codename1.ui.URLImage.ImageAdapter)
except the URL is retrieved from the entity’s property, instead of as a parameter.
prop
- The property where the image url should be retrieved from.placeholder
- The placeholder image.Image createImageToFile(Tag tag, EncodedImage placeholder, String file)
Creates an image for a given property to file system.This behaves similarly to the URLImage.createToFileSystem(com.codename1.ui.EncodedImage, java.lang.String, java.lang.String, com.codename1.ui.URLImage.ImageAdapter)
except the URL is retrieved from the entity’s property, instead of as a parameter.
tag
- The tag used to look up the property to store.placeholder
- The placeholder image.file
- The path where to cache the image in the file system.Image createImageToFile(Property prop, EncodedImage placeholder, String file)
Creates an image for a given property to file system.This behaves similarly to the URLImage.createToFileSystem(com.codename1.ui.EncodedImage, java.lang.String, java.lang.String, com.codename1.ui.URLImage.ImageAdapter)
except the URL is retrieved from the entity’s property, instead of as a parameter.
prop
- The property where the image URL should be retrieved from.placeholder
- The placeholder image.file
- The path where to cache the image in the file system.Image createImageToFile(Tag tag, EncodedImage placeholder, String file, URLImage.ImageAdapter adapter)
Creates an image for a given property to file system.This behaves similarly to the URLImage.createToFileSystem(com.codename1.ui.EncodedImage, java.lang.String, java.lang.String, com.codename1.ui.URLImage.ImageAdapter)
except the URL is retrieved from the entity’s property, instead of as a parameter.
tag
- The tag used to look up the property to store.placeholder
- The placeholder image.file
- The path where to cache the image in the file system.adapter
- Adapter to manipulate the image on load.Image createImageToFile(Property prop, EncodedImage placeholder, String file, URLImage.ImageAdapter adapter)
Creates an image for a given property to file system.This behaves similarly to the URLImage.createToFileSystem(com.codename1.ui.EncodedImage, java.lang.String, java.lang.String, com.codename1.ui.URLImage.ImageAdapter)
except the URL is retrieved from the entity’s property, instead of as a parameter.
prop
- The property where the image URL should be retrieved from.placeholder
- The placeholder image.file
- The path where to cache the image in the file system.adapter
- Adapter to manipulate the image on load.Image createImageToStorage(Tag tag, EncodedImage placeholder, URLImage.ImageAdapter adapter)
Creates an image for a given property to storage. This behaves similarly to the URLImage.createToStorage(com.codename1.ui.EncodedImage, java.lang.String, java.lang.String)
except the URL is retrieved from the entity’s property, instead of as a parameter.
tag
- The tag used to look up the property to store.placeholder
- The placeholder image.adapter
- Adapter for manipulating the image.URLImage.createToStorage(com.codename1.ui.EncodedImage, java.lang.String, java.lang.String)
Image createImageToStorage(Property prop, EncodedImage placeholder, URLImage.ImageAdapter adapter)
Creates an image to storage on the given property. This behaves similarly to the URLImage.createToStorage(com.codename1.ui.EncodedImage, java.lang.String, java.lang.String)
except the URL is retrieved from the entity’s property, instead of as a parameter.
prop
- The property to store the image in.placeholder
- The placeholder image.adapter
- Image createImageToStorage(Tag tag, EncodedImage placeholder)
Creates an image to storage on the given property. This behaves similarly to the URLImage.createToStorage(com.codename1.ui.EncodedImage, java.lang.String, java.lang.String)
except the URL is retrieved from the entity’s property, instead of as a parameter.
tag
- The tag used to look up the property to store.placeholder
- The placeholder image.Image createImageToStorage(Property prop, EncodedImage placeholder)
Creates an image to storage on the given property. This behaves similarly to the URLImage.createToStorage(com.codename1.ui.EncodedImage, java.lang.String, java.lang.String)
except the URL is retrieved from the entity’s property, instead of as a parameter.
prop
- The property to store the image in.placeholder
- The placeholder image.Image createImageToStorage(Tag tag, EncodedImage placeholder, String storageFile)
Creates an image for a given property to storage. This behaves similarly to the URLImage.createToStorage(com.codename1.ui.EncodedImage, java.lang.String, java.lang.String)
except the URL is retrieved from the entity’s property, instead of as a parameter.
tag
- The tag used to look up the property to store.placeholder
- The placeholder image.storageFile
- The storage key to store the image in.URLImage.createToStorage(com.codename1.ui.EncodedImage, java.lang.String, java.lang.String)
Image createImageToStorage(Property prop, EncodedImage placeholder, String storageFile)
Creates an image to storage on the given property.This behaves similarly to the URLImage.createToStorage(com.codename1.ui.EncodedImage, java.lang.String, java.lang.String)
except the URL is retrieved from the entity’s property, instead of as a parameter.
prop
- The property to store the image in.placeholder
- The placeholder image.storageFile
- The storage key where the image should be cached.Image createImageToStorage(Tag tag, EncodedImage placeholder, String storageFile, URLImage.ImageAdapter adapter)
Creates an image for a given property to storage.This behaves similarly to the URLImage.createToStorage(com.codename1.ui.EncodedImage, java.lang.String, java.lang.String)
except the URL is retrieved from the entity’s property, instead of as a parameter.
tag
- The tag used to look up the property to store.placeholder
- The placeholder image.storageFile
- The storage key to store the image in.adapter
- Adapter to manipulate the image when loading.URLImage.createToStorage(com.codename1.ui.EncodedImage, java.lang.String, java.lang.String)
Image createImageToStorage(Property prop, EncodedImage placeholder, String storageFile, URLImage.ImageAdapter adapter)
Creates an image to storage on the given property.This behaves similarly to the URLImage.createToStorage(com.codename1.ui.EncodedImage, java.lang.String, java.lang.String)
except the URL is retrieved from the entity’s property, instead of as a parameter.
prop
- The property to store the image in.placeholder
- The placeholder image.storageFile
- The storage key where the image should be cached.adapter
- Adapter to manipulate the image when loading.Property findProperty(Tag... tags)
Finds the property corresponding to the given tags.
tags
- The tags to search for. The first tag resolving to a property is used.<T> T get(Property<T> prop)
Gets the value of the specified property.
T
- prop
- The property to retrieve.<V> V get(Property prop, ContentType<V> contentType)
Gets property value as given content type.
V
- Content Typeprop
- The property to getcontentType
- The content type.Aggregate getAggregate()
Gets the aggregate that this entity is a part of, or creates a new Aggregate with this entity as a its root.
<T> boolean getAs(Property prop, Class<T> cls, SuccessCallback<T> callback)
<T> boolean getAs(Tag tag, Class<T> cls, SuccessCallback<T> callback)
Boolean getBoolean(Property prop)
Gets property value as Boolean. Consider using isFalsey(com.codename1.rad.models.Property)
instead
of this method if it is possible that the property is null, or stores a type other than Boolean.
prop
- The property.Boolean getBoolean(Tag... tags)
Gets property value as Boolean. Consider using isFalsey(com.codename1.rad.models.Tag)
instead
of this method if it is possible that the property is null, or stores a type other than Boolean.
tags
- Tags to search for. First tag resolving to a property is used.Date getDate(Property prop)
Gets property as date
prop
- The property to setDate getDate(Tag... tags)
Gets property as date.
tags
- Tags used to lookup property.Double getDouble(Property prop)
Gets a property value as a Double.
prop
- The property.Double getDouble(Tag... tags)
Gets property value as a Double.
tags
- Tags to search for. First tag resolving to a property is used.Entity getEntity(Tag... tag)
Gets the a property as an Entity.
tag
- Tag list to search for matching properties.Entity getEntity(Property prop)
Gets the a property value as an Entity.
prop
- The property whose value we wish to retrieve.BaseEntity getEntity()
getEntity
in interface EntityWrapper
EntityList getEntityList(Tag... tag)
Gets a property as an EntityList.
tag
- The tag used to look up the property. More than one tag can be supplied. The first matching
tag (i.e. for which the entity has a corresponding property) will be used.EntityList getEntityList(Property prop)
Gets property as an EntityList
prop
- The property to retrieve.EntityList getEntityListNonNull(Property prop)
Gets property as an EntityList. If the property is currently null, then this will attempt to create a new EntityList at this property, and return that.
prop
- The property.IllegalStateException
- If the property type is not an EntityList type.Entity getEntityNonNull(Property prop)
Gets a property value as an Entity. If the property value is currently null, then this will attempt to create a new Entity at this property, and return that.
prop
- The property to get.IllegalStateException
- If the property type is not an Entity type.EntityType getEntityType()
Gets the entity type of this entity.
Integer getInt(Property prop)
Gets property value as Integer
prop
- Th propertyInteger getInt(Tag... tags)
Gets property value as an Integer.
tags
- Tags to search for. First tag resolving to a property is used.Long getLong(Property prop)
Gets property value as Long
prop
- Th propertyLong getLong(Tag... tags)
Gets property value as a Long.
tags
- Tags to search for. First tag resolving to a property is used.String getText(Property prop)
Gets a property as text.
prop
- The propertyString getText(Tag... tags)
Gets a property value as text.
tags
- The tags to search for. The first tag resolving to a property is used.boolean hasPropertyChangeListeners(Property prop)
boolean hasVetoablePropertyChangeListeners(Property prop)
boolean isEmpty(Property prop)
Checks if property is empty. This includes if property is null, an empty string, or an EntityList that is empty.
prop
- The propertyboolean isEmpty(Tag tag)
Checks if property is empty. This includes if property is null, an empty string, or an EntityList that is empty.
tag
- The tag used to lookup property.boolean isEntity(Property prop)
Checks if property is an Entity.
prop
- The property.boolean isEntity(Tag tag)
Checks if property is an entity.
tag
- The tag to lookup property.boolean isFalsey(Property prop)
Checks if property value is falsey. This includes if the entity doesn’t contain the property, if the property value is null,
or an empty string, or a boolean false
value, is numeric with a 0
value, or is an empty EntityList.
prop
- The property to check.boolean isFalsey(Tag tag)
Checks if property value is falsey. This includes if the entity doesn’t contain the property, if the property value is null,
or an empty string, or a boolean false
value, is numeric with a 0
value, or is an empty EntityList.
tag
- The tag to lookup the property.void removePropertyChangeListener(Property property, ActionListener<PropertyChangeEvent> l)
Removes a property change listener.
property
- The property to listen to.l
- The listener.void removePropertyChangeListener(ActionListener<PropertyChangeEvent> l)
Removes property change listener.
l
- The listener.void removeVetoablePropertyChangeListener(Property property, ActionListener<VetoablePropertyChangeEvent> l)
Removes a property change listener.
property
- The property to listen to.l
- The listener.void removeVetoablePropertyChangeListener(ActionListener<VetoablePropertyChangeEvent> l)
Removes property change listener.
l
- The listener.void set(Property prop, ContentType inputType, Object val)
Sets property as given content type.
prop
- The property to setinputType
- The content type of the input dataval
- The value to set.boolean set(Tag tag, ContentType inputType, Object val)
Sets the property value as the given content type.
tag
- The tag used to lookup the property.inputType
- The content type of the value that is being set.val
- The value.boolean set(ContentType inputType, Object val, Tag... tags)
Sets the property value as the given content type.
inputType
- The content type of the input data.val
- The value to set.tags
- The tags used to lookup the property. The first tag resolving to a property is used.void setBoolean(Property prop, boolean val)
Sets property as boolean
prop
- The property to setval
- The value to set.boolean setBoolean(Tag tag, boolean val)
Sets property as boolean.
tag
- Tag used to lookup property.val
- The value to set.boolean setBoolean(boolean val, Tag... tags)
Sets property as boolean.
val
- The value to set.tags
- Tags used to lookup property.void setChanged(Property prop, boolean firePropertyChange)
Marks a property value as "changed". This will propagate a call to #setChanged()
(marking the whole object as changed), and it will fire a property change event, if the firePropertyChange
argument
is true.
prop
- The property to mark as changed.firePropertyChange
- True to fire a property change event to all listeners of this property.void setDate(Property prop, Date date)
Sets property as Date
prop
- The property to setdate
- The value to set.boolean setDate(Tag tag, Date date)
Sets property as Date.
tag
- Tag used to lookup property.date
- The value to set.boolean setDate(Date date, Tag... tags)
Sets property as Date.
date
- The value to set.tags
- Tags used to lookup property.void setDouble(Property prop, double val)
Sets property as Double
prop
- The property to setval
- The value to set.boolean setDouble(Tag tag, double val)
Sets property as double.
tag
- Tag used to lookup property.val
- The value to set.boolean setDouble(double val, Tag... tags)
Sets property as double.
val
- The value to set.tags
- Tags used to lookup property.void setEntity(Property prop, Entity e)
Sets property as Entity
prop
- The property to sete
- The value to set.boolean setEntity(Tag tag, Entity e)
Sets property as Entity.
tag
- Tag used to lookup property.e
- The value to set.boolean setEntity(Entity e, Tag... tags)
Sets property as Entity.
e
- The value to set.tags
- Tags used to lookup property.void setEntityType(EntityType entityType)
Sets the entity type for this entity. The general pattern for entity definitions is to call this either in the constructor, or in the instance INIT section, AFTER defining the Entity Type.
E.g.
public class Person extends Entity {
public static final EntityType TYPE = new EntityType() {{
string(Thing.name);
string(Thing.description);
}};
{
setEntityType(TYPE);
}
}
entityType
- void setFloat(Property prop, float val)
Sets property as Float
prop
- The property to setval
- The value to set.boolean setFloat(Tag tag, float val)
Sets property as float.
tag
- Tag used to lookup property.val
- The value to set.boolean setFloat(float val, Tag... tags)
Sets property as float.
val
- The value to set.tags
- Tags used to lookup property.void setInt(Property prop, int val)
Sets property as int
prop
- The property to setval
- The value to set.boolean setInt(Tag tag, int val)
Sets property as int.
tag
- Tag used to lookup property.val
- The value to set.boolean setInt(int val, Tag... tags)
Sets property as int.
val
- The value to set.tags
- Tags used to lookup property.void setLong(Property prop, long val)
Sets property as Long
prop
- The property to setval
- The value to set.boolean setLong(Tag tag, long val)
Sets property as long.
tag
- Tag used to lookup property.val
- The value to set.boolean setLong(long val, Tag... tags)
Sets property as long.
val
- The value to set.tags
- Tags used to lookup property.boolean setText(Tag tag, String text)
Sets the given property as text.
tag
- The tag used to lookup the property.text
- The text to set.boolean setText(String text, Tag... tags)
Sets property as text
text
- Text to set as property value.tags
- Tags used to lookup property.Copyright © 2022. All Rights Reserved.