LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.info.binding
Class LyFieldBinding

java.lang.Object
  extended by leon.info.LyTag
      extended by leon.info.binding.LyBinding
          extended by leon.info.binding.LyFieldBinding
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
LyFieldInfoBinding, LyFieldsBinding, LyLdapFieldBinding

public class LyFieldBinding
extends LyBinding
implements java.lang.Cloneable

Container for the binding information found in the data description for fieldInfo.


Nested Class Summary
 
Nested classes/interfaces inherited from class leon.info.LyTag
LyTag.Model
 
Field Summary
static java.lang.String __VERSION
           
 
Constructor Summary
LyFieldBinding(java.lang.String binding, java.lang.String def, java.lang.String cbind, boolean isId)
          Constructor.
LyFieldBinding(java.lang.String binding, java.lang.String def, java.lang.String cbind, boolean isId, java.lang.String javaType, java.lang.String javaEncoder)
          Deprecated. replaced by LyFieldBinding(String binding, String def, String cbind, boolean isId, String javaType, String javaEncoder, String peerType)
LyFieldBinding(java.lang.String binding, java.lang.String def, java.lang.String cbind, boolean isId, java.lang.String javaType, java.lang.String javaEncoder, java.lang.String peerType)
          Constructor.
 
Method Summary
 java.lang.Object decodeValue(LyFieldInfo fieldInfo, java.lang.Object value, java.lang.Class<?> valueClass)
          Builds a logical value for the given fieldInfo from a physical (peer) value.
 java.lang.Object encodeValue(LyFieldInfo fieldInfo, java.lang.Object value, java.lang.Class<?> objectClass)
          Returns an object of the given class from a value of the given fieldInfo.
 java.lang.String getCBind()
          Returns the cbind of this binding.
 java.lang.String getDefault()
          Returns the default value of this binding.
 java.lang.String getJavaEncoder()
          Returns the name of the java class used for encoding/decoding values for this binding.
 java.lang.String getJavaType()
          Returns the name of the java class for this binding.
 java.lang.Class<?> getJavaTypeClass(LyApplication application)
          Returns the java class for this binding corresponding to java type.
 java.lang.String getPeerType()
          Peer type (used by RDBMS which accepts BLOBS and/or CLOBS) otherwise value is 'DEFAULT'
 boolean isId()
          Indicates if this binding is id for the physical layer.
 
Methods inherited from class leon.info.binding.LyBinding
getBinding, isDefaultBinding, setDefaultBinding
 
Methods inherited from class leon.info.LyTag
clone, getApplication, getCommentsEnd, getCommentsStart, getEnvironment, getId, getModelType, getParent, getRootProject, hasAncestor, isExtern, setCommentsEnd, setCommentsStart, wasCloned
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

__VERSION

public static final java.lang.String __VERSION
See Also:
Constant Field Values
Constructor Detail

LyFieldBinding

public LyFieldBinding(java.lang.String binding,
                      java.lang.String def,
                      java.lang.String cbind,
                      boolean isId)
Constructor.

Parameters:
binding - content of the binding information
def -
cbind -
isId -

LyFieldBinding

public LyFieldBinding(java.lang.String binding,
                      java.lang.String def,
                      java.lang.String cbind,
                      boolean isId,
                      java.lang.String javaType,
                      java.lang.String javaEncoder)
Deprecated. replaced by LyFieldBinding(String binding, String def, String cbind, boolean isId, String javaType, String javaEncoder, String peerType)

Constructor kept for backward compatibility.


LyFieldBinding

public LyFieldBinding(java.lang.String binding,
                      java.lang.String def,
                      java.lang.String cbind,
                      boolean isId,
                      java.lang.String javaType,
                      java.lang.String javaEncoder,
                      java.lang.String peerType)
Constructor.

Parameters:
binding - content of the binding information
def -
cbind -
isId -
javaType -
javaEncoder -
peerType - Peer type (used by RDBMS which accepts BLOBS and/or CLOBS) otherwise value is 'DEFAULT'
Method Detail

getDefault

public java.lang.String getDefault()
Returns the default value of this binding.


getCBind

public java.lang.String getCBind()
Returns the cbind of this binding.


isId

public boolean isId()
Indicates if this binding is id for the physical layer.


getJavaType

public java.lang.String getJavaType()
Returns the name of the java class for this binding.


getJavaTypeClass

public java.lang.Class<?> getJavaTypeClass(LyApplication application)
Returns the java class for this binding corresponding to java type.


getPeerType

public java.lang.String getPeerType()
Peer type (used by RDBMS which accepts BLOBS and/or CLOBS) otherwise value is 'DEFAULT'

Returns:
Possible values are 'DEFAULT', 'BLOB' and 'CLOB'

getJavaEncoder

public java.lang.String getJavaEncoder()
Returns the name of the java class used for encoding/decoding values for this binding.


decodeValue

public java.lang.Object decodeValue(LyFieldInfo fieldInfo,
                                    java.lang.Object value,
                                    java.lang.Class<?> valueClass)
Builds a logical value for the given fieldInfo from a physical (peer) value.

Parameters:
fieldInfo - Field info for which the peer value is decoded.
object - The peer value.
valueClass - Expected class of the logical value.
Returns:
The logical value that was built (instance of the valueClass).

encodeValue

public java.lang.Object encodeValue(LyFieldInfo fieldInfo,
                                    java.lang.Object value,
                                    java.lang.Class<?> objectClass)
Returns an object of the given class from a value of the given fieldInfo. The purpose of this method is to support transformations from logical to physical representation.

Parameters:
fieldInfo - Field info for which the logical value is encoded.
value - Value of the fieldInfo. This value is an instance of the class returned by getValueClass method.
objectClass - Expected class of the physical value.

(c) January 2013 - W4 S.A.

Website: W4 S.A., contact us: support@w4global.com