public interface PropertiesProvider
PropertyProvideable for more information| Modifier and Type | Method and Description |
|---|---|
List<String> |
findEntityRefs(String[] prefixes,
String[] name,
String[] searchValue,
boolean exactMatch)
Allows searching for entities by meta property values, at least one of the params (prefix, name,
searchValue) must be set in order to do a search, (searches which return all references to all
entities with properties are not allowed)
WARNING: this search is very fast but will not actually limit by properties that are placed on the entity itself or return the entity itself and is not a substitute for an API which allows searches of your entities (e.g List |
Map<String,String> |
getProperties(String reference)
Retrieve all meta properties for this entity as a map of name->value
|
String |
getPropertyValue(String reference,
String name)
Retrieve a meta property value for a specific property name on a specific entity
|
void |
setPropertyValue(String reference,
String name,
String value)
Set a meta property value on a specific entity, setting a value to null will remove the related
value from persistence, passing the name and value as null will remove all the properties for
this entity from persistence
Note: Do not use this as a substitute for storing core meta data on your actual persistent entities, this is meant to provide for the case where runtime properties need to be added to an entity, persisted, and later retrieved and should be seen as a lazy way to expand the fields of a persistent entity |
String getPropertyValue(String reference, String name)
reference - a globally unique reference to an entityname - the name (key) for this propertyMap<String,String> getProperties(String reference)
reference - a globally unique reference to an entityvoid setPropertyValue(String reference, String name, String value)
reference - a globally unique reference to an entityname - the name (key) for this property, if this and the value are set to null then remove
all the properties for this entity from persistencevalue - the value to store for this property, if null then remove the related value from
persistenceList<String> findEntityRefs(String[] prefixes, String[] name, String[] searchValue, boolean exactMatch)
prefixes - limit the search to a specific entity prefix or set of prefixes,
this must be set and cannot be an empty arrayname - limit the property names to search for, can be null to return all namessearchValue - limit the search by property values can be null to return all values, must be the
same size as the name array if it is not null, (i.e. this cannot be set without
setting at least one name)exactMatch - if true then only match property values exactly, otherwise use a "like" searchCopyright © 2003–2022 Sakai Project. All rights reserved.