Package org.hibernate.metamodel.source.annotations.attribute

Examples of org.hibernate.metamodel.source.annotations.attribute.BasicAttribute


    AttributeNature attributeNature = determineAttributeNature( annotations );
    String accessTypeString = accessType.toString().toLowerCase();
    switch ( attributeNature ) {
      case BASIC: {
        BasicAttribute attribute = BasicAttribute.createSimpleAttribute(
            attributeName, attributeType, annotations, accessTypeString, getLocalBindingContext()
        );
        if ( attribute.isId() ) {
          idAttributeMap.put( attributeName, attribute );
        }
        else if ( attribute.isVersioned() ) {
          if ( versionAttribute == null ) {
            versionAttribute = attribute;
          }
          else {
            throw new MappingException( "Multiple version attributes", localBindingContext.getOrigin() );
View Full Code Here


  @Override
  public IdentifierSource getIdentifierSource() {
    IdType idType = getEntityClass().getIdType();
    switch ( idType ) {
      case SIMPLE: {
        BasicAttribute attribute = getEntityClass().getIdAttributes().iterator().next();
        return new SimpleIdentifierSourceImpl( attribute, getEntityClass().getAttributeOverrideMap() );
      }
      case COMPOSED: {
        throw new NotYetImplementedException( "Composed ids must still be implemented." );
      }
View Full Code Here

    AttributeNature attributeNature = determineAttributeNature( annotations );
    String accessTypeString = accessType.toString().toLowerCase();
    switch ( attributeNature ) {
      case BASIC: {
        BasicAttribute attribute = BasicAttribute.createSimpleAttribute(
            attributeName, attributeType, annotations, accessTypeString, getLocalBindingContext()
        );
        if ( attribute.isId() ) {
          idAttributeMap.put( attributeName, attribute );
        }
        else if ( attribute.isVersioned() ) {
          if ( versionAttribute == null ) {
            versionAttribute = attribute;
          }
          else {
            throw new MappingException( "Multiple version attributes", localBindingContext.getOrigin() );
View Full Code Here

  @Override
  public IdentifierSource getIdentifierSource() {
    IdType idType = getEntityClass().getIdType();
    switch ( idType ) {
      case SIMPLE: {
        BasicAttribute attribute = getEntityClass().getIdAttributes().iterator().next();
        return new SimpleIdentifierSourceImpl( attribute, getEntityClass().getAttributeOverrideMap() );
      }
      case COMPOSED: {
        break;
      }
View Full Code Here

    AttributeType attributeNature = determineAttributeType( annotations );
    String accessTypeString = accessType.toString().toLowerCase();
    switch ( attributeNature ) {
      case BASIC: {
        BasicAttribute attribute = BasicAttribute.createSimpleAttribute(
            attributeName, attributeType, annotations, accessTypeString, getLocalBindingContext()
        );
        if ( attribute.isId() ) {
          idAttributeMap.put( attributeName, attribute );
        }
        else if ( attribute.isVersioned() ) {
          if (
              versionAttribute == null ) {
            versionAttribute = attribute;
          }
          else {
View Full Code Here

TOP

Related Classes of org.hibernate.metamodel.source.annotations.attribute.BasicAttribute

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.