public class GraphPathBean extends OnContextRefreshedEventListener
Constructor and Description |
---|
GraphPathBean() |
Modifier and Type | Method and Description |
---|---|
java.util.Collection<java.lang.String> |
getAllClasses()
Get all the classes mapped by Hibernate.
|
java.lang.Class<? extends ome.model.IObject> |
getClassForSimpleName(java.lang.String simpleName) |
java.util.Set<java.lang.String> |
getDirectSubclassesOf(java.lang.String className)
Get the direct subclasses of the given class, if any.
|
java.lang.String |
getDirectSuperclassOf(java.lang.String className)
Get the direct superclass of the given class, if any.
|
java.lang.String |
getIdentifierProperty(java.lang.String className)
Get the identifier property for the given class.
|
java.lang.String |
getInterfaceImplemented(java.lang.String className,
java.lang.String propertyName)
Get the interface whose method is implemented by a specific class property, if any.
|
java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.String>> |
getLinkedBy(java.lang.String className)
Get the classes and properties that link to the given class.
|
java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.String>> |
getLinkedTo(java.lang.String className)
Get the classes and properties to which the given class links.
|
ome.services.graphs.GraphPathBean.PropertyKind |
getPropertyKind(java.lang.String className,
java.lang.String propertyName)
Get what kind of property a specific class property is.
|
org.hibernate.type.Type |
getPropertyType(java.lang.String className,
java.lang.String propertyName)
Get the Hibernate type of a specific class property.
|
java.util.Set<java.lang.String> |
getSimpleProperties(java.lang.String className)
Deprecated.
instead use
getSimpleProperties(String, boolean) setting isNested to false |
java.util.Set<java.lang.String> |
getSimpleProperties(java.lang.String className,
boolean isNested)
Get the
simpleproperties for the given class, not linking to other mapped classes. |
java.util.Set<java.lang.String> |
getSubclassesOf(java.lang.String className)
Get the subclasses of the given class, if any.
|
java.util.Collection<java.lang.String> |
getSubclassesOfReflexive(java.lang.String className)
Get the name of this class and of its mapped subclasses.
|
java.util.Set<java.lang.String> |
getSuperclassesOf(java.lang.String className)
Get the superclasses of the given class, if any.
|
java.util.Collection<java.lang.String> |
getSuperclassesOfReflexive(java.lang.String className)
Get the name of this class and of its mapped superclasses.
|
void |
handleContextRefreshedEvent(org.springframework.context.event.ContextRefreshedEvent event)
The application context after refresh should contain a usable Hibernate session factory.
|
boolean |
isPropertyAccessible(java.lang.String className,
java.lang.String propertyName)
Find if the given property can be accessed.
|
onApplicationEvent, setApplicationContext
public void handleContextRefreshedEvent(org.springframework.context.event.ContextRefreshedEvent event)
handleContextRefreshedEvent
in class OnContextRefreshedEventListener
event
- the context refreshed event bearing the new application contextpublic java.lang.Class<? extends ome.model.IObject> getClassForSimpleName(java.lang.String simpleName)
simpleName
- the simple name of a mapped IObject classnull
if one is not knownpublic java.util.Collection<java.lang.String> getAllClasses()
public java.lang.String getDirectSuperclassOf(java.lang.String className)
className
- the name of a classnull
public java.util.Set<java.lang.String> getSuperclassesOf(java.lang.String className)
className
- the name of a classnull
public java.util.Collection<java.lang.String> getSuperclassesOfReflexive(java.lang.String className)
className
- the name of a classnull
public java.util.Set<java.lang.String> getDirectSubclassesOf(java.lang.String className)
className
- the name of a classnull
public java.util.Set<java.lang.String> getSubclassesOf(java.lang.String className)
className
- the name of a classnull
public java.util.Collection<java.lang.String> getSubclassesOfReflexive(java.lang.String className)
className
- the name of a classnull
public java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.String>> getLinkedTo(java.lang.String className)
className
- the name of a classnull
public java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.String>> getLinkedBy(java.lang.String className)
className
- the name of a classnull
public ome.services.graphs.GraphPathBean.PropertyKind getPropertyKind(java.lang.String className, java.lang.String propertyName)
className
- the name of a classpropertyName
- the name of a property declared, not just inherited, by that classpublic org.hibernate.type.Type getPropertyType(java.lang.String className, java.lang.String propertyName)
className
- the name of a classpropertyName
- the name of a property declared, not just inherited, by that classpublic java.lang.String getInterfaceImplemented(java.lang.String className, java.lang.String propertyName)
className
- the name of a classpropertyName
- the name of a property declared, not just inherited, by that classnull
public boolean isPropertyAccessible(java.lang.String className, java.lang.String propertyName)
className
- the name of a classpropertyName
- the name of a property declared, not just inherited, by that classpublic java.lang.String getIdentifierProperty(java.lang.String className)
className
- the name of a classnull
if one is not known@Deprecated public java.util.Set<java.lang.String> getSimpleProperties(java.lang.String className)
getSimpleProperties(String, boolean)
setting isNested
to false
simplenon-nested properties for the given class, not linking to other mapped classes.
className
- the name of a classsimpleproperties of the given class; never
null
public java.util.Set<java.lang.String> getSimpleProperties(java.lang.String className, boolean isNested)
simpleproperties for the given class, not linking to other mapped classes.
className
- the name of a classisNested
- if nested properties should have all components given separately with dot-notationsimpleproperties of the given class; never
null