Package org.hibernate

Examples of org.hibernate.PropertyValueException


      if ( checkability[i] && values[i]!=LazyPropertyInitializer.UNFETCHED_PROPERTY ) {
        final Object value = values[i];
        if ( !nullability[i] && value == null ) {
         
          //check basic level one nullablilty
          throw new PropertyValueException(
              "not-null property references a null or transient value",
              persister.getEntityName(),
              persister.getPropertyNames()[i]
            );
         
        }
        else if ( value != null ) {
         
          //values is not null and is checkable, we'll look deeper
          String breakProperties = checkSubElementsNullability( propertyTypes[i], value );
          if ( breakProperties != null ) {
            throw new PropertyValueException(
              "not-null property references a null or transient value",
              persister.getEntityName(),
              buildPropertyPath( persister.getPropertyNames()[i], breakProperties )
            );
          }
View Full Code Here


        if ( checkability[i] && values[i]!=LazyPropertyInitializer.UNFETCHED_PROPERTY ) {
          final Object value = values[i];
          if ( !nullability[i] && value == null ) {

            //check basic level one nullablilty
            throw new PropertyValueException(
                "not-null property references a null or transient value",
                persister.getEntityName(),
                persister.getPropertyNames()[i]
              );

          }
          else if ( value != null ) {

            //values is not null and is checkable, we'll look deeper
            String breakProperties = checkSubElementsNullability( propertyTypes[i], value );
            if ( breakProperties != null ) {
              throw new PropertyValueException(
                "not-null property references a null or transient value",
                persister.getEntityName(),
                buildPropertyPath( persister.getPropertyNames()[i], breakProperties )
              );
            }
View Full Code Here

        if ( checkability[i] && values[i]!= LazyPropertyInitializer.UNFETCHED_PROPERTY ) {
          final Object value = values[i];
          if ( !nullability[i] && value == null ) {

            //check basic level one nullablilty
            throw new PropertyValueException(
                "not-null property references a null or transient value",
                persister.getEntityName(),
                persister.getPropertyNames()[i]
              );

          }
          else if ( value != null ) {
            //values is not null and is checkable, we'll look deeper
            final String breakProperties = checkSubElementsNullability( propertyTypes[i], value );
            if ( breakProperties != null ) {
              throw new PropertyValueException(
                "not-null property references a null or transient value",
                persister.getEntityName(),
                buildPropertyPath( persister.getPropertyNames()[i], breakProperties )
              );
            }
View Full Code Here

      if ( checkability[i] && values[i]!=LazyPropertyInitializer.UNFETCHED_PROPERTY ) {
        final Object value = values[i];
        if ( !nullability[i] && value == null ) {
         
          //check basic level one nullablilty
          throw new PropertyValueException(
              "not-null property references a null or transient value",
              persister.getEntityName(),
              persister.getPropertyNames()[i]
            );
         
        }
        else if ( value != null ) {
         
          //values is not null and is checkable, we'll look deeper
          String breakProperties = checkSubElementsNullability( propertyTypes[i], value );
          if ( breakProperties != null ) {
            throw new PropertyValueException(
              "not-null property references a null or transient value",
              persister.getEntityName(),
              buildPropertyPath( persister.getPropertyNames()[i], breakProperties )
            );
          }
View Full Code Here

      if ( checkability[i] && values[i]!=LazyPropertyInitializer.UNFETCHED_PROPERTY ) {
        final Object value = values[i];
        if ( !nullability[i] && value == null ) {
         
          //check basic level one nullablilty
          throw new PropertyValueException(
              "not-null property references a null or transient value",
              persister.getEntityName(),
              persister.getPropertyNames()[i]
            );
         
        }
        else if ( value != null ) {
         
          //values is not null and is checkable, we'll look deeper
          String breakProperties = checkSubElementsNullability( propertyTypes[i], value );
          if ( breakProperties != null ) {
            throw new PropertyValueException(
              "not-null property references a null or transient value",
              persister.getEntityName(),
              buildPropertyPath( persister.getPropertyNames()[i], breakProperties )
            );
          }
View Full Code Here

        if ( checkability[i] && values[i]!= LazyPropertyInitializer.UNFETCHED_PROPERTY ) {
          final Object value = values[i];
          if ( !nullability[i] && value == null ) {

            //check basic level one nullablilty
            throw new PropertyValueException(
                "not-null property references a null or transient value",
                persister.getEntityName(),
                persister.getPropertyNames()[i]
              );

          }
          else if ( value != null ) {

            //values is not null and is checkable, we'll look deeper
            String breakProperties = checkSubElementsNullability( propertyTypes[i], value );
            if ( breakProperties != null ) {
              throw new PropertyValueException(
                "not-null property references a null or transient value",
                persister.getEntityName(),
                buildPropertyPath( persister.getPropertyNames()[i], breakProperties )
              );
            }
View Full Code Here

        if ( checkability[i] && values[i]!=LazyPropertyInitializer.UNFETCHED_PROPERTY ) {
          final Object value = values[i];
          if ( !nullability[i] && value == null ) {

            //check basic level one nullablilty
            throw new PropertyValueException(
                "not-null property references a null or transient value",
                persister.getEntityName(),
                persister.getPropertyNames()[i]
              );

          }
          else if ( value != null ) {

            //values is not null and is checkable, we'll look deeper
            String breakProperties = checkSubElementsNullability( propertyTypes[i], value );
            if ( breakProperties != null ) {
              throw new PropertyValueException(
                "not-null property references a null or transient value",
                persister.getEntityName(),
                buildPropertyPath( persister.getPropertyNames()[i], breakProperties )
              );
            }
View Full Code Here

        if ( checkability[i] && values[i]!=LazyPropertyInitializer.UNFETCHED_PROPERTY ) {
          final Object value = values[i];
          if ( !nullability[i] && value == null ) {

            //check basic level one nullablilty
            throw new PropertyValueException(
                "not-null property references a null or transient value",
                persister.getEntityName(),
                persister.getPropertyNames()[i]
              );

          }
          else if ( value != null ) {

            //values is not null and is checkable, we'll look deeper
            String breakProperties = checkSubElementsNullability( propertyTypes[i], value );
            if ( breakProperties != null ) {
              throw new PropertyValueException(
                "not-null property references a null or transient value",
                persister.getEntityName(),
                buildPropertyPath( persister.getPropertyNames()[i], breakProperties )
              );
            }
View Full Code Here

      // expected
      assertEquals(jdex, ex.getCause());
      assertTrue(ex.getMessage().indexOf("mymsg") != -1);
    }

    final PropertyValueException pvex = new PropertyValueException("mymsg", "myentity", "myproperty");
    try {
      createTemplate().execute(new HibernateCallback() {
        public Object doInHibernate(org.hibernate.Session session) throws HibernateException {
          throw pvex;
        }
View Full Code Here

        if ( checkability[i] && values[i]!= LazyPropertyInitializer.UNFETCHED_PROPERTY ) {
          final Object value = values[i];
          if ( !nullability[i] && value == null ) {

            //check basic level one nullablilty
            throw new PropertyValueException(
                "not-null property references a null or transient value",
                persister.getEntityName(),
                persister.getPropertyNames()[i]
              );

          }
          else if ( value != null ) {

            //values is not null and is checkable, we'll look deeper
            String breakProperties = checkSubElementsNullability( propertyTypes[i], value );
            if ( breakProperties != null ) {
              throw new PropertyValueException(
                "not-null property references a null or transient value",
                persister.getEntityName(),
                buildPropertyPath( persister.getPropertyNames()[i], breakProperties )
              );
            }
View Full Code Here

TOP

Related Classes of org.hibernate.PropertyValueException

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.