public class Model extends Object
Model
is the link between high-level types and SQL-level objects (entity tables, collections). It defines
all policies relating to the choice of structure (what schema are grouped together in for optimization) and names in
the SQL database (table names, column names), and to what entity names (type name, field name) they correspond.
A Nuxeo schema or type is mapped to a SQL-level table. Several types can be aggregated in the same table. In theory, a type could even be split into different tables.
Modifier and Type | Class and Description |
---|---|
static class |
Model.IdType
Type of ids as seen by the VCS Java layer.
|
Constructor and Description |
---|
Model(ModelSetup modelSetup) |
public static final String ROOT_TYPE
public static final String REPOINFO_TABLE_NAME
public static final String REPOINFO_REPONAME_KEY
public static final String MAIN_KEY
public static final String CLUSTER_NODES_TABLE_NAME
public static final String CLUSTER_NODES_NODEID_KEY
public static final String CLUSTER_NODES_CREATED_KEY
public static final String CLUSTER_INVALS_TABLE_NAME
public static final String CLUSTER_INVALS_NODEID_KEY
public static final String CLUSTER_INVALS_ID_KEY
public static final String CLUSTER_INVALS_FRAGMENTS_KEY
public static final String CLUSTER_INVALS_KIND_KEY
public static final String MAIN_PRIMARY_TYPE_PROP
public static final String MAIN_PRIMARY_TYPE_KEY
public static final String MAIN_MIXIN_TYPES_PROP
public static final String MAIN_MIXIN_TYPES_KEY
public static final String MAIN_BASE_VERSION_PROP
public static final String MAIN_BASE_VERSION_KEY
public static final String MAIN_CHECKED_IN_PROP
public static final String MAIN_CHECKED_IN_KEY
public static final String MAIN_MAJOR_VERSION_PROP
public static final String MAIN_MAJOR_VERSION_KEY
public static final String MAIN_MINOR_VERSION_PROP
public static final String MAIN_MINOR_VERSION_KEY
public static final String MAIN_IS_VERSION_PROP
public static final String MAIN_IS_VERSION_KEY
public static final String MAIN_IS_DELETED_PROP
public static final String MAIN_IS_DELETED_KEY
public static final String MAIN_DELETED_TIME_PROP
public static final String MAIN_DELETED_TIME_KEY
public static final String UID_SCHEMA_NAME
public static final String UID_MAJOR_VERSION_KEY
public static final String UID_MINOR_VERSION_KEY
public static final String HIER_TABLE_NAME
public static final String HIER_PARENT_KEY
public static final String HIER_CHILD_NAME_KEY
public static final String HIER_CHILD_POS_KEY
public static final String HIER_CHILD_ISPROPERTY_KEY
public static final String ANCESTORS_TABLE_NAME
public static final String ANCESTORS_ANCESTOR_KEY
public static final String COLL_TABLE_POS_KEY
public static final String COLL_TABLE_VALUE_KEY
public static final String MISC_TABLE_NAME
public static final String MISC_LIFECYCLE_POLICY_PROP
public static final String MISC_LIFECYCLE_POLICY_KEY
public static final String MISC_LIFECYCLE_STATE_PROP
public static final String MISC_LIFECYCLE_STATE_KEY
public static final String ACL_TABLE_NAME
public static final String ACL_PROP
public static final String ACL_POS_KEY
public static final String ACL_NAME_KEY
public static final String ACL_GRANT_KEY
public static final String ACL_PERMISSION_KEY
public static final String ACL_CREATOR_KEY
public static final String ACL_BEGIN_KEY
public static final String ACL_END_KEY
public static final String ACL_STATUS_KEY
public static final String ACL_USER_KEY
public static final String ACL_GROUP_KEY
public static final String VERSION_TABLE_NAME
public static final String VERSION_VERSIONABLE_PROP
public static final String VERSION_VERSIONABLE_KEY
public static final String VERSION_CREATED_PROP
public static final String VERSION_CREATED_KEY
public static final String VERSION_LABEL_PROP
public static final String VERSION_LABEL_KEY
public static final String VERSION_DESCRIPTION_PROP
public static final String VERSION_DESCRIPTION_KEY
public static final String VERSION_IS_LATEST_PROP
public static final String VERSION_IS_LATEST_KEY
public static final String VERSION_IS_LATEST_MAJOR_PROP
public static final String VERSION_IS_LATEST_MAJOR_KEY
public static final String PROXY_TYPE
public static final String PROXY_TABLE_NAME
public static final String PROXY_TARGET_PROP
public static final String PROXY_TARGET_KEY
public static final String PROXY_VERSIONABLE_PROP
public static final String PROXY_VERSIONABLE_KEY
public static final String LOCK_TABLE_NAME
public static final String LOCK_OWNER_PROP
public static final String LOCK_OWNER_KEY
public static final String LOCK_CREATED_PROP
public static final String LOCK_CREATED_KEY
public static final String FULLTEXT_DEFAULT_INDEX
public static final String FULLTEXT_TABLE_NAME
public static final String FULLTEXT_JOBID_PROP
public static final String FULLTEXT_JOBID_KEY
public static final String FULLTEXT_FULLTEXT_PROP
public static final String FULLTEXT_FULLTEXT_KEY
public static final String FULLTEXT_SIMPLETEXT_PROP
public static final String FULLTEXT_SIMPLETEXT_KEY
public static final String FULLTEXT_BINARYTEXT_PROP
public static final String FULLTEXT_BINARYTEXT_KEY
public static final String HIER_READ_ACL_TABLE_NAME
public static final String HIER_READ_ACL_ID
public static final String HIER_READ_ACL_ACL_ID
public static final String ACLR_USER_MAP_TABLE_NAME
public static final String ACLR_USER_MAP_USER_ID
public static final String ACLR_USER_MAP_ACL_ID
public static final String FIELD_TYPE_LARGETEXT
public static final String FIELD_TYPE_ARRAY
public static final String FIELD_TYPE_ARRAY_LARGETEXT
public static final Long NO_SUCH_LONG_ID
protected final boolean softDeleteEnabled
protected final boolean proxiesEnabled
protected final Model.IdType idType
protected final PropertyType idPropertyType
protected final Type idCoreType
protected final boolean miscInHierarchy
protected final RepositoryDescriptor repositoryDescriptor
protected final Map<String,Set<String>> documentTypesMixins
protected final Map<String,Set<String>> typeFragments
protected final Map<String,Set<String>> mixinFragments
protected final Map<String,Set<String>> docTypePrefetchedFragments
protected final Map<String,Map<String,String>> schemaComplexChildren
protected final Map<String,Map<String,String>> typeComplexChildren
protected final Map<String,Map<String,String>> mixinComplexChildren
protected final Map<String,String> documentSuperTypes
protected final Map<String,Set<String>> documentSubTypes
protected final Map<String,String> fieldFragment
protected final FulltextConfiguration fulltextConfiguration
protected final Set<String> noPerDocumentQueryFacets
protected final Map<String,PropertyType> fulltextInfoByFragment
public Model(ModelSetup modelSetup)
public RepositoryDescriptor getRepositoryDescriptor()
public Serializable idFromString(String id)
id
- the id to fixuppublic String idToString(Serializable id)
the
- serializable idpublic ModelProperty getPropertyInfo(String typeName, String propertyName)
public Map<String,ModelProperty> getMixinPropertyInfos(String mixin)
public ModelProperty getProxySchemasPropertyInfo(String propertyName)
public ModelProperty getMixinPropertyInfo(String mixin, String propertyName)
public ModelProperty getPropertyInfo(String propertyName)
public ModelProperty getPathPropertyInfo(String xpath)
ModelProperty.isIntermediateSegment()
= true for an intermediate segment of a complex property.public Set<String> getPropertyInfoNames()
public ModelProperty getPathPropertyInfo(String primaryType, String[] mixinTypes, String path)
public Map<String,String> getTypeComplexChildren(String typeName)
public Map<String,String> getMixinComplexChildren(String mixin)
public Set<String> getSimpleTextPropertyPaths(String primaryType, String[] mixinTypes)
public boolean isProxySchemaPath(String xpath)
public FulltextConfiguration getFulltextConfiguration()
public PropertyType getFulltextFieldType(String fragmentName, String fragmentKey)
fragmentName
- fragmentKey
- the key or null
for a collectionPropertyType.STRING
or PropertyType.BINARY
if this field is to be indexed as fulltextpublic PropertyType getFulltextInfoForFragment(String fragmentName)
fragmentName
- public Type getSpecialPropertyType(String propertyName)
public PropertyType getCollectionFragmentType(String fragmentName)
public boolean isCollectionFragment(String fragmentName)
public String getCollectionOrderBy(String fragmentName)
public Set<String> getFragmentNames()
public Map<String,ColumnType> getFragmentKeysType(String fragmentName)
public Map<String,List<String>> getBinaryPropertyInfos()
public Set<String> getTypePrefetchedFragments(String typeName)
public String getDocumentSuperType(String typeName)
public Set<String> getDocumentSubTypes(String typeName)
public Set<String> getDocumentTypes()
public Set<String> getDocumentTypeFacets(String typeName)
public Set<String> getMixinDocumentTypes(String mixin)
public Map<String,Set<Serializable>> getPerFragmentIds(Map<Serializable,RowMapper.IdWithTypes> idToTypes)
public Set<String> getTypeFragments(RowMapper.IdWithTypes typeInfo)
public Set<String> getNoPerDocumentQueryFacets()
public String getFulltextIndexSuffix(String indexName)
Copyright © 2016 Nuxeo SA. All rights reserved.