com.quinsoft.zeidon.HiddenAttributeException Maven / Gradle / Ivy
/**
*
*/
package com.quinsoft.zeidon;
import com.quinsoft.zeidon.objectdefinition.AttributeDef;
/**
* This exception is thrown when an application attempts to reference a hidden
* attribute by name. Hidden attributes can only be referenced via AttributeDef.
*
* Java example:
*
* Instead of
*
* {@code
* attrInstance = view.cursor( "MyEntity" ).getAttribute( "MyHiddenEntity" );
* }
*
* Use
*
* {@code
* AttributeDef attributeDef = view.cursor( "MyEntity" ).getEntityDef().getAttribute( "MyHiddenAttribute" );
* attrInstance = view.cursor( "MyEntity" ).getAttribute( attributeDef );
* }
*
*
* Scala example:
*
* Instead of
*
* {@code
* val attrInstance = view.MyEntity.MyHiddenAttribute
* }
*
* Use
*
* {@code
* val attrDef = request.MyEntity.entityDef.getAttribute( "MyHiddenAttribute" )
* val attrInstance = request.MyEntity.getAttribute( attrDef )
* }
*
*/
public class HiddenAttributeException extends ZeidonException
{
private static final long serialVersionUID = 1L;
public HiddenAttributeException( AttributeDef attributeDef )
{
super( "Attemping to reference a hidden attribute by name. To use a hidden attribute "
+ "you must first get the AttributeDef." );
prependAttributeDef( attributeDef );
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy