| java.lang.Object hu.netmind.persistence.ClassTracker
ClassTracker | public class ClassTracker implements TransactionListener(Code) | | This class keeps track of different classes and objects. It's main
purpose is to implement object reflection based logic, and provide
type information.
author: Brautigam Robert version: Revision: $Revision$ |
TYPE_HANDLED | final public static int TYPE_HANDLED(Code) | | |
TYPE_JAVA | final public static int TYPE_JAVA(Code) | | |
TYPE_NONE | final public static int TYPE_NONE(Code) | | |
TYPE_OBJECT | final public static int TYPE_OBJECT(Code) | | |
TYPE_PRIMITIVE | final public static int TYPE_PRIMITIVE(Code) | | |
TYPE_RESERVED | final public static int TYPE_RESERVED(Code) | | |
getClassInfo | public ClassInfo getClassInfo(Class clazz, String dynamicName)(Code) | | Get class information object of given class. Also, if class
information does not exist, it will be created.
|
getMatchingClassInfo | public ClassInfo getMatchingClassInfo(String postfix)(Code) | | Get a Class instance for a class name postfix. The given parameter
is treated as a postfix for a fully qualified class name. The postfix
is considered matching, when it contains whole class of package
qualifiers. For example: "book" matches "hu.netmind.persistence.Book"
class, but does not match "hu.netmind.persistence.CookBook". Also
"persistence.book" matches "hu.netmind.persistence.Book", but
"tence.book" does not match to previous class.
If no classes are found null is returned. If more than one matching
class is present, then one of them is returned (no guarantees which
one is picked).
Parameters: postfix - The class name postfix. The class info for which the postfix applies, or null. |
getRelatedClassEntries | public List getRelatedClassEntries(ClassEntry entry)(Code) | | Get all related classes to the given entry. Related class entries are
all given class' super- and sub-classes which are all storable.
Calling this method on non-storable entry will result in an undefined
result.
|
getStorableRootClassEntries | public List getStorableRootClassEntries(ClassEntry entry)(Code) | | Get all storable roots for given entry. A storable root for a
storable entry is itself. A non-storable entry (such as java.lang.Object)
will have potentially a lot of storable roots: All classes in the
class hierarchy which are storable, but have non-storable superclasses.
So, storable roots are the first storable entry in a class hierarchy
path (roots of the storable sub-forest). When a query is received
for a non-stored class, the query will split into queries for all
storable roots.
|
getSubClasses | public List getSubClasses(ClassEntry entry)(Code) | | Get all subclasses of given entry, including itself.
|
getTableClassInfo | public ClassInfo getTableClassInfo(String tableName)(Code) | | Get the class info for a given table name.
|
getType | public int getType(Class clazz)(Code) | | Get the type id of given class.
|
isDynamicCanidate | public boolean isDynamicCanidate(Class clazz)(Code) | | Return whether given class can be dynamic.
|
isPrimitive | public static boolean isPrimitive(Class clazz)(Code) | | Return whether the given class is a primitive type.
|
transactionCommited | public void transactionCommited(Transaction transaction)(Code) | | Activate table names added in the transaction.
|
transactionRolledback | public void transactionRolledback(Transaction transaction)(Code) | | Discard table names added in the transaction.
|
|
|