Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or .
*/
package org.hibernate.boot.model.source.internal.hbm;
import java.util.Locale;
/**
* Provides meta-information about XML elements.
*
* @author Steve Ebersole
*/
public enum XmlElementMetadata {
/**
* Describes the {@code } element
*/
ID( true, true ),
/**
* Describes the {@code } element
*/
COMPOSITE_ID( false, true ),
/**
* Describes the {@code } element
*/
DISCRIMINATOR( true, false ),
/**
* Describes the {@code } element
*/
MULTI_TENANCY( true, false ),
/**
* Describes the {@code } element
*/
VERSION( true, true ),
/**
* Describes the {@code } element
*/
TIMESTAMP( true, true ),
/**
* Describes the {@code } element
*/
NATURAL_ID( false, false ),
/**
* Describes the {@code } element
*/
PROPERTIES( false, true ),
/**
* Describes the {@code } element
*/
PROPERTY( false, true ),
/**
* Describes the {@code } element
*/
KEY_PROPERTY( false, true ),
/**
* Describes the {@code } element
*/
MANY_TO_ONE( false, true ),
/**
* Describes the {@code } element
*/
KEY_MANY_TO_ONE( false, true ),
/**
* Describes the {@code } element
*/
ONE_TO_ONE( false, true ),
/**
* Describes the {@code } element
*/
ANY( false, true ),
/**
* Describes the {@code } element
*/
COMPONENT( false, true ),
/**
* Describes the {@code } element
*/
KEY( false, false ),
/**
* Describes the {@code } element
*/
SET( false, true ),
/**
* Describes the {@code } element
*/
LIST( false, true ),
/**
* Describes the {@code } element
*/
BAG( false, true ),
/**
* Describes the {@code } element
*/
ID_BAG( false, true ),
/**
* Describes the {@code } element
*/
MAP( false, true ),
/**
* Describes the {@code } element
*/
ARRAY( false, true ),
/**
* Describes the {@code } element
*/
PRIMITIVE_ARRAY( false, true ),
/**
* Describes the {@code } element
*/
COLLECTION_ID( true, false ),
/**
* Describes the {@code } element
*/
ELEMENT( false, false ),
/**
* Describes the {@code } element
*/
MANY_TO_MANY( false, false ),
/**
* Describes the {@code } element
*/
MANY_TO_ANY( false, false ),
/**
* Describes the {@code } element
*/
MAP_KEY( false, false ),
/**
* Describes the {@code } element
*/
MAP_KEY_MANY_TO_MANY( false, false ),
/**
* Describes the {@code } element
*/
INDEX( false, false ),
/**
* Describes the {@code } element
*/
INDEX_MANY_TO_MANY( false, false ),
/**
* Describes the {@code } element
*/
LIST_INDEX( true, false );
private final boolean inherentlySingleColumn;
private final boolean canBeNamed;
XmlElementMetadata(boolean inherentlySingleColumn, boolean canBeNamed) {
this.inherentlySingleColumn = inherentlySingleColumn;
this.canBeNamed = canBeNamed;
}
/**
* The corresponding {@code hbm.xml} element name. Used in error reporting
*
* @return The {@code hbm.xml} element name
*/
public String getElementName() {
return name().toLowerCase(Locale.ROOT);
}
/**
* Can this source, by nature, define just a single column/formula?
*
* @return {@code true} indicates that the source will refer to just a
* single column.
*/
public boolean isInherentlySingleColumn() {
return inherentlySingleColumn;
}
/**
* Can the source be named. This is used in implicit naming (naming strategy).
*
* @return {@code true} indicates that the source can be named and therefore
* the column (assuming just one) is eligible for implicit naming.
*/
public boolean canBeNamed() {
return canBeNamed;
}
}