public class PropertyUtility extends Object
| Constructor and Description |
|---|
PropertyUtility() |
| Modifier and Type | Method and Description |
|---|---|
static CastorHashMap |
convertTransitiveProperties(PropertyDescriptionList pdList)
Converts transitive PropertyDescriptions to VertexProprties (CastorHashMap).
|
static String |
getClassIdNames(ArrayList<PropertyDescription> pdlist) |
static String |
getDefaultValue(ArrayList<PropertyDescription> pdlist,
String name)
Reads the default value of the Property
|
static String |
getNames(ArrayList<PropertyDescription> pdlist) |
static Property |
getProperty(ItemPath itemPath,
BuiltInItemProperties prop,
Object locker) |
static Property |
getProperty(ItemPath itemPath,
String propName,
Object locker) |
static PropertyDescriptionList |
getPropertyDescriptionOutcome(ItemPath itemPath,
String descVer,
Object locker)
Reads the PropertyDescriptionList either from a built-in type of Item using LocalObjectLoader
or from the 'last' Viewpoint of the 'PropertyDescription' Outcome in the Item (very likely a Factory Item).
|
static String |
getValue(ArrayList<PropertyDescription> pdlist,
String name)
Deprecated.
badly named method, use getDefaultValue() instead
|
static boolean |
propertyExists(ItemPath itemPath,
String propName,
Object locker) |
static void |
writeProperty(ItemPath item,
BuiltInItemProperties prop,
String value,
Object locker)
Updates (writes) the value of an existing Property
|
static void |
writeProperty(ItemPath item,
String name,
String value,
Object locker)
Updates (writes) the value of an existing Property
|
public static String getValue(ArrayList<PropertyDescription> pdlist, String name)
pdlist - the list of Properties to searchname - name of the Property to search forpublic static String getDefaultValue(ArrayList<PropertyDescription> pdlist, String name)
pdlist - the list of Properties to searchname - name of the Property to search forpublic static boolean propertyExists(ItemPath itemPath, String propName, Object locker)
itemPath - propName - locker - public static Property getProperty(ItemPath itemPath, BuiltInItemProperties prop, Object locker) throws ObjectNotFoundException
itemPath - prop - locker - ObjectNotFoundExceptionpublic static Property getProperty(ItemPath itemPath, String propName, Object locker) throws ObjectNotFoundException
itemPath - propName - locker - ObjectNotFoundExceptionpublic static String getNames(ArrayList<PropertyDescription> pdlist)
pdlist - public static String getClassIdNames(ArrayList<PropertyDescription> pdlist)
pdlist - public static PropertyDescriptionList getPropertyDescriptionOutcome(ItemPath itemPath, String descVer, Object locker) throws ObjectNotFoundException
itemPath - the Item containing the PropertyDescriptionListdescVer - the version of the PropertyDescriptionListlocker - transaction keyObjectNotFoundException - PropertyDescriptionList cannot be retrievedpublic static CastorHashMap convertTransitiveProperties(PropertyDescriptionList pdList)
pdList - the PropertyDescriptions to be usedpublic static void writeProperty(ItemPath item, BuiltInItemProperties prop, String value, Object locker) throws PersistencyException, ObjectCannotBeUpdated, ObjectNotFoundException
item - the Path (UUID) of actual Itemprop - the BuiltIn ItemProperty to writevalue - the value of the Propertylocker - transaction keyPersistencyException - something went wrong updating the databaseObjectCannotBeUpdated - the Property is immutableObjectNotFoundException - there is no Property with the given namepublic static void writeProperty(ItemPath item, String name, String value, Object locker) throws PersistencyException, ObjectCannotBeUpdated, ObjectNotFoundException
item - the Path (UUID) of actual Itemname - the name of the Property to writevalue - the value of the Propertylocker - transaction keyPersistencyException - something went wrong updating the databaseObjectCannotBeUpdated - the Property is immutableObjectNotFoundException - there is no Property with the given nameCopyright © 1997–2020 CRISTAL-iSE. All rights reserved.