Package com.storedobject.core
Class StoredObjectUtility
java.lang.Object
com.storedobject.core.StoredObjectUtility
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringListbrowseColumns(Class<? extends StoredObject> objectClass) Deprecated.static StringbrowseOrder(Class<? extends StoredObject> objectClass) Deprecated.static <T extends StoredObject>
booleanchanged(T newObject, T oldObject, StyledBuilder changes) static ClassAttribute<? extends StoredObject> classAttribute(int family) Deprecated.static <T extends StoredObject>
ClassAttribute<T> classAttribute(Class<T> objectClass) Deprecated.static <T extends StoredObject>
ClassAttribute<T> classAttribute(T object) Deprecated.static String[]createDDL(Class<? extends StoredObject> objectClass) static MethodcreateMethod(Class<?> objectClass, String attributeName) createMethodList(Class<?> objectClass, String attributeName) static StoredObjectUtility.MethodList[]createMethodLists(Class<?> objectClass, StringList attributeNames) static Method[]createMethods(Class<?> objectClass, String[] attributeNames) static StringcreateSQL(ClassAttribute<?> ca, String columns, String condition, String order, boolean only, boolean header, int skip, int limit, int[] distinct) Create a SQL execution string.static StringListdisplayColumns(Class<? extends StoredObject> objectClass) Deprecated.static String[]dropDDL(Class<? extends StoredObject> objectClass) static <O extends StoredObject>
StringBuilderdump(StoredObject object, StringBuilder buffer) static ObjectemptyValue(Class<?> p) static booleanstatic voidexecuteRaw(Method method, Object object, Object objectValue) static <T extends StoredObject>
intDeprecated.static String[]foreignKeysDDL(Class<? extends StoredObject> objectClass) static <T extends StoredObject>
Tstatic <T extends StoredObject>
Tstatic <T extends StoredObject>
Tstatic <T extends StoredObject>
Tstatic Class<? extends StoredObject> getObjectClass(String className) static QuerygetTransactionLog(SystemUser su, Timestamp from, Timestamp to) static inthints(Class<? extends StoredObject> objectClass) Deprecated.static inthowBig(Class<? extends StoredObject> objectClass, boolean any) Deprecated.static Propertiesinitialize(File properties) static Propertiesinitialize(File properties, Properties variables) static Propertiesstatic Propertiesinitialize(InputStream in, Properties variables) static Propertiesinitialize(String propertiesFileName) static Propertiesinitialize(String propertiesFileName, Properties variables) static Propertiesinitialize(Properties properties) static Propertiesinitialize(Properties properties, Properties variables) static StringListlinks(Class<? extends StoredObject> masterClass) Deprecated.static <T extends StoredObject>
ObjectIterator<T> static <T extends StoredObject>
ObjectIterator<T> static <T extends StoredObject>
ObjectIterator<T> static <T extends StoredObject>
ObjectIterator<T> static StringListprotectedColumns(Class<? extends StoredObject> objectClass) Deprecated.static String[]reindex(Class<? extends StoredObject> objectClass) static <O extends StoredObject>
OretrieveObject(Class<O> objectClass, Object value) Retrieve an instance of theStoredObjectfrom the value provided.static booleansameContent(TransactionManager tm, StoredObject one, StoredObject two) static StringListsearchColumns(Class<? extends StoredObject> objectClass) Deprecated.static Stringstatic StringstackTrace(int count) static StringstackTrace(int count, boolean includeCore) static StringstackTrace(int count, boolean includeCore, int skip) static intstatusUI(Class<? extends StoredObject> objectClass) Deprecated.static voidsubstituteVariables(Properties properties, Properties variables) static Stringstatic Stringstatic <O extends StoredObject>
StringtoString(StoredObject object) static <O extends StoredObject>
StringtoString(StoredObject object, boolean showAttributes)
-
Constructor Details
-
StoredObjectUtility
public StoredObjectUtility()
-
-
Method Details
-
classAttribute
Deprecated. -
family
Deprecated. -
classAttribute
Deprecated. -
classAttribute
@Deprecated public static <T extends StoredObject> ClassAttribute<T> classAttribute(Class<T> objectClass) Deprecated. -
createDDL
- Throws:
Exception
-
foreignKeysDDL
-
dropDDL
-
reindex
-
substituteVariables
-
initialize
-
initialize
-
initialize
-
initialize
-
initialize
-
initialize
-
initialize
-
initialize
-
howBig
Deprecated. -
hints
Deprecated. -
statusUI
Deprecated. -
displayColumns
Deprecated. -
searchColumns
Deprecated. -
protectedColumns
Deprecated. -
browseColumns
Deprecated. -
links
Deprecated. -
browseOrder
Deprecated. -
toDisplay
-
toDisplay
-
createMethod
-
createMethods
-
createMethodList
public static StoredObjectUtility.MethodList createMethodList(Class<?> objectClass, String attributeName) -
createMethodLists
public static StoredObjectUtility.MethodList[] createMethodLists(Class<?> objectClass, StringList attributeNames) -
execute
-
executeRaw
-
emptyValue
-
retrieveObject
Retrieve an instance of theStoredObjectfrom the value provided. The value may be anything including some representation of theIdor the object's stringified value from which it can be crated using its "get" method if it exists.- Type Parameters:
O- Type of theStoredObject.- Parameters:
objectClass- Class of theStoredObject.value- Value to be converted.- Returns:
- The instance created or null if not convertible.
-
toString
-
toString
-
dump
public static <O extends StoredObject> StringBuilder dump(StoredObject object, StringBuilder buffer) -
getObjectClass
-
get
public static <T extends StoredObject> T get(Class<T> objectClass, String nameField, String nameValue) -
get
public static <T extends StoredObject> T get(Class<T> objectClass, String nameField, String nameValue, String extraCondition) -
list
public static <T extends StoredObject> ObjectIterator<T> list(Class<T> objectClass, String nameField, String nameValue) -
list
public static <T extends StoredObject> ObjectIterator<T> list(Class<T> objectClass, String nameField, String nameValue, String extraCondition) -
get
public static <T extends StoredObject> T get(Class<T> objectClass, String nameField, String nameValue, boolean any) -
get
public static <T extends StoredObject> T get(Class<T> objectClass, String nameField, String nameValue, String extraCondition, boolean any) -
list
public static <T extends StoredObject> ObjectIterator<T> list(Class<T> objectClass, String nameField, String nameValue, boolean any) -
list
public static <T extends StoredObject> ObjectIterator<T> list(Class<T> objectClass, String nameField, String nameValue, String extraCondition, boolean any) -
stackTrace
-
stackTrace
-
stackTrace
-
stackTrace
-
getTransactionLog
-
sameContent
public static boolean sameContent(TransactionManager tm, StoredObject one, StoredObject two) throws Exception - Throws:
Exception
-
changed
public static <T extends StoredObject> boolean changed(T newObject, T oldObject, StyledBuilder changes) -
createSQL
public static String createSQL(ClassAttribute<?> ca, String columns, String condition, String order, boolean only, boolean header, int skip, int limit, int[] distinct) Create a SQL execution string. (Can be used for debugging purposes).- Parameters:
ca- Class attribute.columns- Columns.condition- Condition.order- Order by clause.only- Whether to use inherited instances or not.header- Header to be used or not.skip- Number of rows to be skipped before returning the results.limit- Limit the number of rows.distinct- Column numbers for the DISTINCT clause. An empty array is used to consider all the columns.- Returns:
- SQL string.
-