org.jclarion.clarion
Class ClarionKey

java.lang.Object
  extended by org.jclarion.clarion.PropertyObject
      extended by org.jclarion.clarion.ClarionKey

public class ClarionKey
extends PropertyObject

Model a sort key in Clarion

Author:
barney

Nested Class Summary
static class ClarionKey.Order
           
 
Constructor Summary
ClarionKey(java.lang.String label)
           
 
Method Summary
 ClarionKey addAscendingField(ClarionObject object)
          Add field that is ascending
 ClarionKey addDescendingField(ClarionObject object)
           
 ClarionKey addField(ClarionObject object, boolean descend, java.lang.String function)
           
protected  void debugMetaData(java.lang.StringBuilder sb)
           
 boolean duplicateCheck()
          Return whether or not adding current record would trigger a duplicate key error
 boolean equals(java.lang.Object o)
           
 java.util.List<ClarionKey.Order> getFields()
           
 ClarionFile getFile()
           
 ClarionObject getLocalProperty(int index)
           
 ClarionKey.Order[] getOrder()
           
 PropertyObject getParentPropertyObject()
           
 ClarionString getPosition()
          Get string position store for the given key
 ClarionObject getProperty(ClarionObject key, ClarionObject index)
          Retrieve property setting.
 void reget(ClarionString string)
          Re-fetch record from the database based on position string
 void reset(ClarionString string)
          Re-set sequentual processing from the database based on position string
 void set()
          Set record processing order based on specified key.
 void set(ClarionKey key)
           
 ClarionKey setDuplicate()
          Key allows duplicate records
 void setFile(ClarionFile clarionFile)
           
 ClarionKey setName(java.lang.String name)
          Specify key name
 ClarionKey setNocase()
          Key is case insensitive
 ClarionKey setOptional()
          Key is optional, i.e.
 ClarionKey setPrimary()
          Key is a primary key
 void setStart()
          Set sequentual processing.
 java.lang.String toString()
           
 
Methods inherited from class org.jclarion.clarion.PropertyObject
addListener, canNotifyLocalChange, clearMetaData, debugMetaData, getDebugMetaData, getDebugMetaData, getId, getInheritedProperty, getProperty, getProperty, getProperty, getPropertyOrDefault, getRawProperty, getRawProperty, getSetProperties, isProperty, isSettable, notifyLocalChange, reMap, removeAllListeners, removeListener, setClonedProperty, setClonedProperty, setClonedProperty, setClonedProperty, setClonedProperty, setId, setProperty, setProperty, setProperty, setProperty, setProperty
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClarionKey

public ClarionKey(java.lang.String label)
Method Detail

setPrimary

public ClarionKey setPrimary()
Key is a primary key

Returns:

setDuplicate

public ClarionKey setDuplicate()
Key allows duplicate records

Returns:

setNocase

public ClarionKey setNocase()
Key is case insensitive

Returns:

setOptional

public ClarionKey setOptional()
Key is optional, i.e. zero/null values are not keyed

Returns:

setName

public ClarionKey setName(java.lang.String name)
Specify key name

Parameters:
name -
Returns:

addAscendingField

public ClarionKey addAscendingField(ClarionObject object)
Add field that is ascending

Parameters:
object -
Returns:

addField

public ClarionKey addField(ClarionObject object,
                           boolean descend,
                           java.lang.String function)

addDescendingField

public ClarionKey addDescendingField(ClarionObject object)

set

public void set()
Set record processing order based on specified key. Start position is based on current settings in key


set

public void set(ClarionKey key)

getPosition

public ClarionString getPosition()
Get string position store for the given key

Returns:

duplicateCheck

public boolean duplicateCheck()
Return whether or not adding current record would trigger a duplicate key error

Returns:
true if adding current record would trigger duplicate key

reget

public void reget(ClarionString string)
Re-fetch record from the database based on position string

Parameters:
string -

reset

public void reset(ClarionString string)
Re-set sequentual processing from the database based on position string

Parameters:
string -

setStart

public void setStart()
Set sequentual processing. Setting start position to start of file


setFile

public void setFile(ClarionFile clarionFile)

getFile

public ClarionFile getFile()

getFields

public java.util.List<ClarionKey.Order> getFields()

getOrder

public ClarionKey.Order[] getOrder()

getParentPropertyObject

public PropertyObject getParentPropertyObject()
Specified by:
getParentPropertyObject in class PropertyObject

getProperty

public ClarionObject getProperty(ClarionObject key,
                                 ClarionObject index)
Description copied from class: PropertyObject
Retrieve property setting. i.e. PROP:Font,1

Overrides:
getProperty in class PropertyObject
Returns:

getLocalProperty

public ClarionObject getLocalProperty(int index)
Overrides:
getLocalProperty in class PropertyObject

toString

public java.lang.String toString()
Overrides:
toString in class PropertyObject

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

debugMetaData

protected void debugMetaData(java.lang.StringBuilder sb)
Specified by:
debugMetaData in class PropertyObject


Copyright © 2010. All Rights Reserved.