Package org.hibernate

Examples of org.hibernate.MappingException


   * @param sequenceName the name of the sequence
   * @return String The "nextval" select string.
   * @throws MappingException If sequences are not supported.
   */
  public String getSequenceNextValString(String sequenceName) throws MappingException {
    throw new MappingException( "Dialect does not support sequences" );
  }
View Full Code Here


   * @param sequenceName the name of the sequence
   * @return The "nextval" fragment.
   * @throws MappingException If sequences are not supported.
   */
  public String getSelectSequenceNextValString(String sequenceName) throws MappingException {
    throw new MappingException( "Dialect does not support sequences" );
  }
View Full Code Here

   * @param sequenceName The name of the sequence
   * @return The sequence creation command
   * @throws MappingException If sequences are not supported.
   */
  protected String getCreateSequenceString(String sequenceName) throws MappingException {
    throw new MappingException( "Dialect does not support sequences" );
  }
View Full Code Here

   */
  protected String getCreateSequenceString(String sequenceName, int initialValue, int incrementSize) throws MappingException {
    if ( supportsPooledSequences() ) {
      return getCreateSequenceString( sequenceName ) + " start with " + initialValue + " increment by " + incrementSize;
    }
    throw new MappingException( "Dialect does not support pooled sequences" );
  }
View Full Code Here

   * @param sequenceName The name of the sequence
   * @return The sequence drop commands
   * @throws MappingException If sequences are not supported.
   */
  protected String getDropSequenceString(String sequenceName) throws MappingException {
    throw new MappingException( "Dialect does not support sequences" );
  }
View Full Code Here

        auxDbObject = ( AuxiliaryDatabaseObject ) ReflectHelper
            .classForName( definitionNode.attributeValue( "class" ) )
            .newInstance();
      }
      catch( ClassNotFoundException e ) {
        throw new MappingException(
            "could not locate custom database object class [" +
            definitionNode.attributeValue( "class" ) + "]"
          );
      }
      catch( Throwable t ) {
        throw new MappingException(
            "could not instantiate custom database object class [" +
            definitionNode.attributeValue( "class" ) + "]"
          );
      }
    }
View Full Code Here

      bindSimpleValue( idNode, id, false, propertyName, mappings );
    }

    if ( propertyName == null || !entity.hasPojoRepresentation() ) {
      if ( !id.isTypeSpecified() ) {
        throw new MappingException( "must specify an identifier type: "
          + entity.getEntityName() );
      }
    }
    else {
      id.setTypeUsingReflection( entity.getClassName(), propertyName );
View Full Code Here

    bindProperty( subnode, prop, mappings, inheritedMetas );
    // for version properties marked as being generated, make sure they are "always"
    // generated; aka, "insert" is invalid; this is dis-allowed by the DTD,
    // but just to make sure...
    if ( prop.getGeneration() == PropertyGeneration.INSERT ) {
      throw new MappingException( "'generated' attribute cannot be 'insert' for versioning property" );
    }
    makeVersion( subnode, val );
    entity.setVersion( prop );
    entity.addProperty( prop );
  }
View Full Code Here

    persistentClass.setLazy( lazy );

    String entityName = node.attributeValue( "entity-name" );
    if ( entityName == null ) entityName = getClassName( node.attribute("name"), mappings );
    if ( entityName==null ) {
      throw new MappingException( "Unable to determine entity name" );
    }
    persistentClass.setEntityName( entityName );

    bindPojoRepresentation( node, persistentClass, mappings, inheritedMetas );
    bindDom4jRepresentation( node, persistentClass, mappings, inheritedMetas );
View Full Code Here

      try {
        entity.setEntityPersisterClass( ReflectHelper.classForName( persisterNode
          .getValue() ) );
      }
      catch (ClassNotFoundException cnfe) {
        throw new MappingException( "Could not find persister class: "
          + persisterNode.getValue() );
      }
    }

    // CUSTOM SQL
View Full Code Here

TOP

Related Classes of org.hibernate.MappingException

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.