Package wt.introspection
Class ClassInfo
java.lang.Object
wt.introspection.ClassInfo
- All Implemented Interfaces:
Externalizable,Serializable
- Direct Known Subclasses:
LinkInfo
ClassInfo is the class for providing class meta-data
There will be an instance of this class for each modeled
business class that is installed.
Supported API: true
Extendable: false
Supported API: true
Extendable: false
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanCompares two objects for equality.wt.introspection.ColumnDescriptor[]Return all the ColumnDescriptor's (if any) associated with the named attribute.Object[]getAttributeValueSet(String name) Gets the set of valid values for the named attribute.Gets the business class represented by this info instance.Gets the class name of the business class represented by this info instance.Gets the instantiable class represented by this info instance.Gets the DatastoreElementType of the class.Gets the DataType of the class.Gets an array of ClassInfos of all the descendent classes.Gets the direct descendent class infos.Gets the display name for the class.getDisplayName(Locale locale) Gets the display name for the class, for the specified locale.Gets the fully qualified class name of the resource bundle for the open icon.getOtherSideRole(String name) Gets a named RoleDescriptor, which is opposite of this class.getOtherSideRole(String name, LinkInfo info) Gets a named RoleDescriptor, for a particular association, which is opposite of this class.Gets an array of RoleDescriptors, which are opposite instances of this class, in all of the associations, within which this class can participate.Gets the parent class info of the business class represented by this info instance.Gets the name of the parent class of the business class represented by this info instance.Gets the parent interface infos for the business class represented by this info instance.getPropertyDescriptor(String name) Gets a property descriptor for the named attribute of the class.Gets the array of property descriptors for the class.static StringgetPropertyDisplayName(PropertyDescriptor property, Locale locale) Gets the display name for the named property of the class, for the specified locale.static StringgetPropertyShortDescription(PropertyDescriptor property, Locale locale) Gets the display name for the property of the class, for the specified locale.Gets a read-only property descriptor for the named attribute of the class.Gets the fully qualified class name of the resource bundle for the standard icon.Retrieve a named attribute with this feature.inthashCode()Return hashcode that is consistent with equals implementation.booleanGets the concrete status of this class.booleanGets the persistable status of this class.booleanisSuperclassOf(ClassInfo classInfo) Answer whether class parents the supplied classInfo.Gets an object, which can be used to get a localized message for this class, having the request deferred to time or location where the locale may not be the same as the current locale.toString()Returns a string representation of the object.
-
Method Details
-
equals
Compares two objects for equality. Returns a boolean that indicates whether this object is equivalent to the specified object. This method is used when an object is stored in a hashtable.
Supported API: true -
hashCode
public int hashCode()Return hashcode that is consistent with equals implementation.
Supported API: true -
getAttributeValueSet
Gets the set of valid values for the named attribute.
Supported API: true- Parameters:
String- the name of the attribute- Returns:
- the set of valid values for the attribute
- Throws:
WTIntrospectionException
-
getBusinessClass
Gets the business class represented by this info instance.
Supported API: true- Returns:
- The business class described by this info instance.
- Throws:
WTIntrospectionException
-
getClassname
Gets the class name of the business class represented by this info instance.
Supported API: true- Returns:
- The fully qualified name of the business class described by this info instance.
-
getConcreteClass
Gets the instantiable class represented by this info instance.
Supported API: true- Returns:
- The instantiable class described by this info instance.
- Throws:
WTIntrospectionException
-
getDescendentInfos
Gets an array of ClassInfos of all the descendent classes.
Supported API: true- Returns:
- Array of ClassInfos of all the descendent classes
- Throws:
WTIntrospectionException
-
getDirectDescendentInfos
Gets the direct descendent class infos.
Supported API: true- Returns:
- Array of Class objects of the direct descendent class infos
- Throws:
WTException- to be determinedWTIntrospectionException
-
getDisplayName
Gets the display name for the class.
Supported API: true- Returns:
- The display name string.
- See Also:
-
getDisplayName
Gets the display name for the class, for the specified locale.
Supported API: true- Returns:
- The display name string.
-
getOpenIcon
Gets the fully qualified class name of the resource bundle for the open icon.
Supported API: true- Returns:
- String the fully qualified class name of the resource bundle for the icon
- Throws:
WTIntrospectionException
-
getOtherSideRole
Gets a named RoleDescriptor, which is opposite of this class.
Supported API: true- Returns:
- a RoleDesciptor that can be navigated
- Throws:
WTIntrospection- ExceptionWTIntrospectionException- See Also:
-
#getOtherSideRoles(String,LinkInfo)
-
getOtherSideRole
Gets a named RoleDescriptor, for a particular association, which is opposite of this class.
Supported API: true- Returns:
- a RoleDesciptor that can be navigated
- Throws:
WTIntrospection- ExceptionWTIntrospectionException
-
getOtherSideRoles
Gets an array of RoleDescriptors, which are opposite instances of this class, in all of the associations, within which this class can participate.
Supported API: true- Returns:
- array of RoleDesciptors that can be navigated
- Throws:
WTIntrospection- ExceptionWTIntrospectionException
-
getParentClassInfo
Gets the parent class info of the business class represented by this info instance.
Supported API: true- Returns:
- The parent class info of the business class described by this info instance.
- Throws:
WTIntrospectionException
-
getParentClassname
Gets the name of the parent class of the business class represented by this info instance.
Supported API: true- Returns:
- The name of the parent class of the business class described by this info instance.
-
getParentInterfaceInfos
Gets the parent interface infos for the business class represented by this info instance. (Will only include interfaces that were modeled.)
Supported API: true- Returns:
- The parent interface infos of the business class described by this info instance.
- Throws:
WTIntrospectionException
-
getPropertyDescriptor
Gets a property descriptor for the named attribute of the class.
Supported API: true- Returns:
- PropertyDescriptor for the named attribute
- Throws:
WTIntrospectionException- if fails to load class or fails to locate named property
-
getPropertyDescriptors
Gets the array of property descriptors for the class.
Supported API: true- Returns:
- PropertyDescriptor[] for the class.
- Throws:
WTIntrospectionException- if fails to load class or bean info for class
-
getPropertyDisplayName
Gets the display name for the named property of the class, for the specified locale.
Supported API: true- Returns:
- The property's display name string.
-
getPropertyShortDescription
Gets the display name for the property of the class, for the specified locale.
Supported API: true- Returns:
- The property's display name string.
-
getReadPropertyDescriptor
Gets a read-only property descriptor for the named attribute of the class. This method exists as an alternative togetPropertyDescriptor, to avoid the SecurityException that is thrown when reflecting on methods that are not public. That is, when a property has a protected write method (setter).
Supported API: true- Returns:
- PropertyDescriptor for the named attribute, which is read-only
- Throws:
WTIntrospectionException- if fails to load class or fails to locate named property
-
getStandardIcon
Gets the fully qualified class name of the resource bundle for the standard icon.
Supported API: true- Returns:
- String the fully qualified class name of the resource bundle for the icon
- Throws:
WTIntrospectionException
-
isConcrete
public boolean isConcrete()Gets the concrete status of this class. NOTE: This does not return concrete status in the strict Java class sense.
Supported API: true- Returns:
- true, if this class is concrete AND the class is not a ForeignKeyLink with an abstract role class.
-
isPersistable
public boolean isPersistable()Gets the persistable status of this class.
Supported API: true- Returns:
- true, if this class is persistable
-
getDatastoreElementType
Gets the DatastoreElementType of the class.
Supported API: true- Returns:
- DatastoreElementType the datastore element type of the class
-
getDataType
Gets the DataType of the class. If an explicit assignment has not been made for a class, a default assignment algorithm is applied. The default case will inherit from parents, based on a priority algorithm that defaults toward the USER end of the spectrum. If no parents have an explicit type, the default value will be return, except for concrete classes, which will default to USER.
Supported API: true- Returns:
- DataType the datatype of the class, which indicates who owns the data in the table
- Throws:
WTIntrospectionException
-
isSuperclassOf
Answer whether class parents the supplied classInfo. Result is based on the info descendency information to avoid needing class files.
Supported API: true- Returns:
- true, if this class is a super class of classInfo
- Throws:
WTIntrospectionException- See Also:
-
getAttributeColumnDescriptors
public wt.introspection.ColumnDescriptor[] getAttributeColumnDescriptors(String name) throws WTIntrospectionException Return all the ColumnDescriptor's (if any) associated with the named attribute.
Supported API: true- Returns:
- ColumnDescriptor[]
- Throws:
WTIntrospectionException- See Also:
-
ColumnDescriptor
-
toDisplayNameMessage
Gets an object, which can be used to get a localized message for this class, having the request deferred to time or location where the locale may not be the same as the current locale.
Supported API: true- Returns:
- A LocalizableMessage instance, for this class.
-
toString
Returns a string representation of the object.
Supported API: true -
getValue
Retrieve a named attribute with this feature.
Supported API: true- Parameters:
attribute_name- - The locale-independent name of the attribute- Returns:
- object Return an arbitrary value assigned as an extended property of the class. May be null if the attribute is unknown.
-