LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.info.binding
Class LyUnionBinding

java.lang.Object
  extended by leon.info.LyTag
      extended by leon.info.binding.LyBinding
          extended by leon.info.binding.LyClassBinding
              extended by leon.info.binding.LyUnionBinding
All Implemented Interfaces:
java.lang.Cloneable

public class LyUnionBinding
extends LyClassBinding

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


Nested Class Summary
 
Nested classes/interfaces inherited from class leon.info.LyTag
LyTag.Model
 
Field Summary
static java.lang.String __VERSION
           
 
Constructor Summary
LyUnionBinding()
          Constructor.
LyUnionBinding(boolean strict)
          Constructor.
 
Method Summary
 void addClassBinding(LyClassBinding classBinding)
          Add a class binding
 void addUnion(LyUnion union)
          Add an union to this binding.
 void clearUnionList()
          Clear all union.
 boolean equals(LyUnionBinding o)
          Compare current object with another.
 boolean equals(java.lang.Object o)
          Compare current object with another.
 java.util.List<java.lang.String> getAllBindings()
          Find all bindings (class bindings) for this union binding.
 LyClassBinding getClassBinding1()
          Method to get the class binding of class 1
 LyClassBinding getClassBinding2()
          Method to get the class binding of class 2
 LyFilter getFilter()
          Return union filter
 LyField getPeerField(LyFieldInfo fieldInfo)
          Accessor to the peer field related to a given field info.
 LyField[] getPeerFields(LyFieldInfo fieldInfo)
          Accessor to the peer fields related to a given field info.
 LyUnion getUnion(int index)
          Return the union at the given index.
 int getUnionCount()
          Return the number of union fields pair
 java.util.Vector<LyUnion> getUnions()
          Return the unions list of this binding.
 java.lang.String getValue1(int index)
          Return the union field of class 1 for the given index
 java.lang.String getValue2(int index)
          Return the union field of class 1 for the given index
 int getValueCount()
          Deprecated. Use getUnionCount
 java.util.Vector<java.lang.String> getValues1()
          Return all union fields of class 1
 java.util.Vector<java.lang.String> getValues2()
          Return all union fields of class 2
 boolean isStrict()
          Checks if the union is strict or not.
 void setValues(java.lang.String value1, java.lang.String value2)
          Deprecated. Use addUnion
 
Methods inherited from class leon.info.binding.LyClassBinding
addPeerField, addPeerFields, check, getFieldBinding, getLocation, getPeerClass, removePeerField, setFilter, setPeerClass
 
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
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

LyUnionBinding

public LyUnionBinding()
Constructor.


LyUnionBinding

public LyUnionBinding(boolean strict)
Constructor.

Method Detail

getClassBinding1

public LyClassBinding getClassBinding1()
Method to get the class binding of class 1

Returns:
class binding for class 1

getClassBinding2

public LyClassBinding getClassBinding2()
Method to get the class binding of class 2

Returns:
class binding for class 2

getFilter

public LyFilter getFilter()
Return union filter

Overrides:
getFilter in class LyClassBinding
Returns:
And of filters of the class bindings.

getValue1

public java.lang.String getValue1(int index)
Return the union field of class 1 for the given index

Parameters:
index - index of field
Returns:
Id of field

getValue2

public java.lang.String getValue2(int index)
Return the union field of class 1 for the given index

Parameters:
index - index of field
Returns:
Id of field

getValues1

public java.util.Vector<java.lang.String> getValues1()
Return all union fields of class 1

Returns:
a vector of fields id

getValues2

public java.util.Vector<java.lang.String> getValues2()
Return all union fields of class 2

Returns:
a vector of fields id

addClassBinding

public void addClassBinding(LyClassBinding classBinding)
Add a class binding

Parameters:
classBinding - class binding to add

addUnion

public void addUnion(LyUnion union)
Add an union to this binding.


clearUnionList

public void clearUnionList()
Clear all union.


setValues

public void setValues(java.lang.String value1,
                      java.lang.String value2)
Deprecated. Use addUnion

set a pair of union fields for class 1 and class 2


getUnions

public java.util.Vector<LyUnion> getUnions()
Return the unions list of this binding.


getUnion

public LyUnion getUnion(int index)
Return the union at the given index.


getUnionCount

public int getUnionCount()
Return the number of union fields pair

Returns:
the number of union fields pair

getValueCount

public int getValueCount()
Deprecated. Use getUnionCount

Return the number of union fields pair


getPeerField

public LyField getPeerField(LyFieldInfo fieldInfo)
Accessor to the peer field related to a given field info.

Overrides:
getPeerField in class LyClassBinding
Parameters:
fieldInfo - the reference of a field info.
Returns:
the related field info.

getPeerFields

public LyField[] getPeerFields(LyFieldInfo fieldInfo)
Accessor to the peer fields related to a given field info.

Overrides:
getPeerFields in class LyClassBinding
Parameters:
fieldInfo - the reference of a field info.
Returns:
the associated peer fields.

equals

public boolean equals(java.lang.Object o)
Compare current object with another.

Overrides:
equals in class LyClassBinding
Parameters:
o - object to compare

equals

public boolean equals(LyUnionBinding o)
Compare current object with another.

Parameters:
o - object to compare

getAllBindings

public java.util.List<java.lang.String> getAllBindings()
Find all bindings (class bindings) for this union binding. Internal use only

Returns:
the name of physical bindings

isStrict

public final boolean isStrict()
Checks if the union is strict or not.

Returns:
True if strict, false otherwise.

(c) January 2013 - W4 S.A.

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