@Recordable.LabelFields(value="name") public class ObjectType extends Record implements ObjectStruct
Record
s are structured.Modifier and Type | Class and Description |
---|---|
static interface |
ObjectType.AnnotationProcessor<A extends Annotation>
Represents a class that can manipulate a type.
|
static interface |
ObjectType.AnnotationProcessorClass
Specifies the class that can manipulate a type using the target
annotation.
|
static interface |
ObjectType.PostProcessor
Processor for Recordable.TypePostProcessorClass.
|
static class |
ObjectType.Static
ObjectType utility methods. |
Recordable.Abstract, Recordable.BeanProperty, Recordable.BootstrapFollowReferences, Recordable.BootstrapPackages, Recordable.BootstrapTypeMappable, Recordable.CollectionMaximum, Recordable.CollectionMinimum, Recordable.Denormalized, Recordable.DenormalizedFields, Recordable.DisplayName, Recordable.Embedded, Recordable.FieldCollectionMaximum, Recordable.FieldCollectionMinimum, Recordable.FieldDisplayName, Recordable.FieldEmbedded, Recordable.FieldGlobal, Recordable.FieldIgnored, Recordable.FieldIndexed, Recordable.FieldInternalName, Recordable.FieldInternalNamePrefix, Recordable.FieldItemTypes, Recordable.FieldMaximum, Recordable.FieldMinimum, Recordable.FieldPattern, Recordable.FieldRequired, Recordable.FieldStep, Recordable.FieldTypes, Recordable.FieldUnique, Recordable.FieldValues, Recordable.Groups, Recordable.Ignored, Recordable.IgnoredIfEmbedded, Recordable.Indexed, Recordable.InternalName, Recordable.JunctionField, Recordable.JunctionPositionField, Recordable.LabelFields, Recordable.Maximum, Recordable.MetricValue, Recordable.MimeTypes, Recordable.Minimum, Recordable.PreviewField, Recordable.Raw, Recordable.Recalculate, Recordable.Regex, Recordable.Required, Recordable.SourceDatabaseClass, Recordable.SourceDatabaseName, Recordable.SourceDatabaseProviderClass, Recordable.Step, Recordable.TypeId, Recordable.TypePostProcessorClasses, Recordable.Types, Recordable.TypesExclude, Recordable.Values, Recordable.Where
ICON_COLOR_16x16, ICON_COLOR_32x32, ICON_MONO_16x16, ICON_MONO_32x32
Constructor and Description |
---|
ObjectType() |
Modifier and Type | Method and Description |
---|---|
Object |
createObject(UUID id)
Creates an object of this type with the given
id . |
Set<ObjectType> |
findConcreteTypes()
Finds a set of all the other concrete
types that are compatible with this one.
|
Set<String> |
getAssignableClassNames()
Returns the list of class names whose instances can be assigned
from the objects of this type.
|
Class<?> |
getAugmentationClass(Class<?> targetClass) |
Map<String,Set<String>> |
getAugmentationClassNamesByTargetClassName() |
Set<String> |
getDenormalizedFields()
Returns the set of all denormalized field names.
|
String |
getDisplayName()
Returns the display name.
|
DatabaseEnvironment |
getEnvironment()
Returns the environment that owns this struct.
|
ObjectField |
getField(String name)
Returns the field associated with the given
name in this type. |
ObjectField |
getFieldGlobally(String name)
Returns the field associated with the given
name in this type
or globally in all types. |
List<ObjectField> |
getFields()
Returns a list of all fields.
|
Set<String> |
getGroups()
Returns the list of groups.
|
ObjectIndex |
getIndex(String name)
Returns the index with the given
name . |
ObjectIndex |
getIndexByFields(String... names) |
List<ObjectField> |
getIndexedFields()
Deprecated.
|
List<ObjectIndex> |
getIndexes()
Returns a list of all the indexes.
|
static ObjectType |
getInstance(Class<?> objectClass)
Returns an instance with the given
objectClass . |
static ObjectType |
getInstance(String name)
Returns an instance with the given
name . |
static ObjectType |
getInstance(UUID id)
Returns an instance with the given
id . |
String |
getInternalName()
Returns the internal name.
|
String |
getJavaBeanProperty() |
List<String> |
getLabelFields()
Returns the list of field names that are combined to create labels
for the objects of this type.
|
ObjectMethod |
getMethod(String name)
Returns the method associated with the given
name in this type. |
List<ObjectMethod> |
getMethods()
Returns all of the methods that Dari is aware of.
|
List<ObjectField> |
getMetricFields() |
Set<String> |
getModificationClassNames()
Returns the set of modification class names.
|
Class<?> |
getObjectClass()
Returns the class used to create objects of this type.
|
String |
getObjectClassName()
Returns name of the class used to create objects of this type.
|
String |
getPreviewField()
Returns the field name used to create the previews of the objects
represented by this type.
|
Database |
getSourceDatabase()
Returns the source database.
|
String |
getSourceDatabaseClassName()
Returns the source database class name.
|
String |
getSourceDatabaseName()
Returns the source database name.
|
String |
getSourceDatabaseProviderClassName() |
List<String> |
getSuperClassNames()
Returns the list of super class names.
|
void |
initialize()
Initializes this type definition with the reflection data from the
object class of this type.
|
boolean |
isAbstract()
Returns
true if the objects of this type cannot be created. |
boolean |
isConcrete()
Returns
true if the objects of this type can be saved to the
database. |
boolean |
isDenormalized()
Returns
true if the objects of this type is always denormalized
within other objects. |
boolean |
isDeprecated() |
boolean |
isEmbedded()
Returns
true if the objects of this type can only be embedded
within other objects. |
boolean |
isInstantiableTo(Class<?> targetClass)
Returns
true if this type can be converted into an instance
of the given targetClass . |
boolean |
isLazyLoaded() |
boolean |
isMethod(String name)
Returns whether the given
name is an ObjectMethod in this type. |
void |
modify(Class<?> modificationClass)
Modifies this type definition with the reflection data from the
given
modificationClass . |
static void |
modifyAll(Database database,
Class<?> modificationClass)
Modifies all the type definitions with the reflection data from
the given
modificationClass . |
void |
setAbstract(boolean isAbstract)
Sets whether the objects of this type cannot be created.
|
void |
setAssignableClassNames(Set<String> assignableClassNames)
Sets the list of class names whose instances can be assigned
from the objects of this type.
|
void |
setAugmentationClassNamesByTargetClassName(Map<String,Set<String>> augmentationClassNamesByTargetClassName) |
void |
setDenormalized(boolean denormalized)
Sets whether the objects of this type is always denormalized
within other objects.
|
void |
setDenormalizedFields(Set<String> denormalizedFields)
Sets the set of all denormalized field names.
|
void |
setDeprecated(boolean deprecated) |
void |
setDisplayName(String displayName)
Sets the display name.
|
void |
setEmbedded(boolean isEmbedded)
Sets whether the objects of this type can only be embedded
within other objects.
|
void |
setFields(List<ObjectField> fields)
Sets the list of all fields.
|
void |
setGroups(Set<String> groups)
Sets the list of groups.
|
void |
setIndexes(List<ObjectIndex> indexes)
Sets the list of all indexes.
|
void |
setInternalName(String internalName)
Sets the internal name.
|
void |
setJavaBeanProperty(String javaBeanProperty) |
void |
setLabelFields(List<String> fields)
Sets the list of field names that are combined to create labels
for the objects of this type.
|
void |
setModificationClasses(Set<String> modificationClasses)
Sets the set of modification class names.
|
void |
setObjectClassName(String objectClassName)
Sets name of the class used to create objects of this type.
|
void |
setPreviewField(String field)
Sets the field name used to create the previews of the objects
represented by this type.
|
void |
setSourceDatabaseClassName(String sourceDatabaseClassName)
Sets the source database class name.
|
void |
setSourceDatabaseName(String sourceDatabaseName)
Sets the source database name.
|
void |
setSourceDatabaseProviderClassName(String sourceDatabaseProviderClassName) |
void |
setSuperClassNames(List<String> superClassNames)
Sets the list of super class names.
|
afterCreate, afterDelete, afterDelete, afterSave, afterSave, beforeCommit, beforeDelete, beforeDelete, beforeSave, beforeSave, beginWrites, clone, commitWrites, compareTo, delete, endWrites, equals, format, getAdditionalBeanInfo, getAs, getBeanDescriptor, getDefaultEventIndex, getDefaultPropertyIndex, getEventSetDescriptors, getExtra, getIcon, getId, getLabel, getMethodDescriptors, getModifications, getPropertyDescriptors, getState, hashCode, is, is, onDuplicate, onValidate, queryFrom, receiveMessage, save, saveEventually, saveImmediately, saveUniquely, sendMessage, setState, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
findIndexedFields
as
public static void modifyAll(Database database, Class<?> modificationClass)
modificationClass
.public String getDisplayName()
public void setDisplayName(String displayName)
public String getInternalName()
public void setInternalName(String internalName)
public List<String> getLabelFields()
public void setLabelFields(List<String> fields)
public String getPreviewField()
public void setPreviewField(String field)
public boolean isDeprecated()
public void setDeprecated(boolean deprecated)
public boolean isAbstract()
true
if the objects of this type cannot be created.public void setAbstract(boolean isAbstract)
public boolean isEmbedded()
true
if the objects of this type can only be embedded
within other objects.public void setEmbedded(boolean isEmbedded)
public boolean isDenormalized()
true
if the objects of this type is always denormalized
within other objects.public void setDenormalized(boolean denormalized)
public Set<String> getDenormalizedFields()
public void setDenormalizedFields(Set<String> denormalizedFields)
@Recordable.Indexed public boolean isConcrete()
true
if the objects of this type can be saved to the
database.public DatabaseEnvironment getEnvironment()
ObjectStruct
getEnvironment
in interface ObjectStruct
null
.public List<ObjectField> getFields()
getFields
in interface ObjectStruct
null
.public void setFields(List<ObjectField> fields)
setFields
in interface ObjectStruct
fields
- null
to clear.public List<ObjectField> getMetricFields()
public ObjectField getField(String name)
name
in this type.getField
in interface ObjectStruct
name
- If null
, returns null
.null
.public ObjectMethod getMethod(String name)
name
in this type.name
- If null
, returns null
.null
.public List<ObjectMethod> getMethods()
public boolean isMethod(String name)
name
is an ObjectMethod in this type.name
- If null
, returns false
.public ObjectField getFieldGlobally(String name)
name
in this type
or globally in all types.name
- If null
, returns null
.null
.@Deprecated public List<ObjectField> getIndexedFields()
ObjectStruct.Static.findIndexedFields(com.psddev.dari.db.ObjectStruct)
instead.public List<ObjectIndex> getIndexes()
getIndexes
in interface ObjectStruct
null
.public ObjectIndex getIndexByFields(String... names)
public void setIndexes(List<ObjectIndex> indexes)
setIndexes
in interface ObjectStruct
indexes
- null
to clear.public ObjectIndex getIndex(String name)
name
.getIndex
in interface ObjectStruct
name
- If null
, returns null
.null
.public String getObjectClassName()
public void setObjectClassName(String objectClassName)
public Class<?> getObjectClass()
public String getSourceDatabaseClassName()
public void setSourceDatabaseClassName(String sourceDatabaseClassName)
public String getSourceDatabaseName()
public void setSourceDatabaseName(String sourceDatabaseName)
public String getSourceDatabaseProviderClassName()
public void setSourceDatabaseProviderClassName(String sourceDatabaseProviderClassName)
public Database getSourceDatabase()
null
.public String getJavaBeanProperty()
public void setJavaBeanProperty(String javaBeanProperty)
public Set<String> getModificationClassNames()
public void setModificationClasses(Set<String> modificationClasses)
public void setSuperClassNames(List<String> superClassNames)
public Set<String> getAssignableClassNames()
public void setAssignableClassNames(Set<String> assignableClassNames)
public Map<String,Set<String>> getAugmentationClassNamesByTargetClassName()
public void setAugmentationClassNamesByTargetClassName(Map<String,Set<String>> augmentationClassNamesByTargetClassName)
public boolean isLazyLoaded()
public void initialize()
public void modify(Class<?> modificationClass)
modificationClass
.public Set<ObjectType> findConcreteTypes()
public static ObjectType getInstance(UUID id)
id
.public static ObjectType getInstance(String name)
name
.public static ObjectType getInstance(Class<?> objectClass)
objectClass
.public boolean isInstantiableTo(Class<?> targetClass)
true
if this type can be converted into an instance
of the given targetClass
.isInstantiableTo
in interface Recordable
targetClass
- non-null
.State.isInstantiableTo(Class)
Copyright © 2018 PERFECT SENSE digital, LLC. All rights reserved.