org.synchronoss.cpo.jdbc
Class JdbcCpoOrderBy

Package class diagram package JdbcCpoOrderBy
java.lang.Object
  extended by org.synchronoss.cpo.jdbc.JdbcCpoOrderBy
All Implemented Interfaces:
CpoOrderBy

public class JdbcCpoOrderBy
extends java.lang.Object
implements CpoOrderBy

JdbcCpoOrderBy is an interface for specifying the sort order in which objects are returned from the Datasource.


Constructor Summary
JdbcCpoOrderBy(java.lang.String attr, boolean asc)
           
JdbcCpoOrderBy(java.lang.String attr, boolean asc, java.lang.String func)
           
 
Method Summary
 boolean getAscending()
          Gets the boolean that determines if the objects will be returned from from the CpoAdapter in Ascending order or Descending order
 java.lang.String getAttribute()
          Gets the name of the attribute that is to be used to sort the results from the CpoAdapter.
 java.lang.String getFunction()
          Gets a string representing a datasource specific function call that must be applied to the attribute that will be used for sorting.
 void setAscending(boolean b)
          Sets the boolean that determines if the objects will be returned from from the CpoAdapter in Ascending order or Descending order
 void setAttribute(java.lang.String s)
          Sets the name of the attribute that is to be used to sort the results from the CpoAdapter.
 void setFunction(java.lang.String s)
          Sets a string representing a datasource specific function call that must be applied to the attribute that will be used for sorting.
 java.lang.String toString(JdbcMetaClass<?> jmc)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JdbcCpoOrderBy

public JdbcCpoOrderBy(java.lang.String attr,
                      boolean asc)

JdbcCpoOrderBy

public JdbcCpoOrderBy(java.lang.String attr,
                      boolean asc,
                      java.lang.String func)
Method Detail

getAscending

public boolean getAscending()
Gets the boolean that determines if the objects will be returned from from the CpoAdapter in Ascending order or Descending order

Specified by:
getAscending in interface CpoOrderBy
Returns:
boolean true if it is to sort in Ascensing Order false if it is to be sorted in Descending Order

setAscending

public void setAscending(boolean b)
Sets the boolean that determines if the objects will be returned from from the CpoAdapter in Ascending order or Descending order

Specified by:
setAscending in interface CpoOrderBy
Parameters:
b - true if it is to sort in Ascensing Order false if it is to be sorted in Descending Order

getAttribute

public java.lang.String getAttribute()
Gets the name of the attribute that is to be used to sort the results from the CpoAdapter.

Specified by:
getAttribute in interface CpoOrderBy
Returns:
String The name of the attribute

setAttribute

public void setAttribute(java.lang.String s)
Sets the name of the attribute that is to be used to sort the results from the CpoAdapter.

Specified by:
setAttribute in interface CpoOrderBy
Parameters:
s - The name of the attribute

getFunction

public java.lang.String getFunction()
Gets a string representing a datasource specific function call that must be applied to the attribute that will be used for sorting. i.e. - "upper(attribute_name)"

Specified by:
getFunction in interface CpoOrderBy
Returns:
String The name of the function

setFunction

public void setFunction(java.lang.String s)
Sets a string representing a datasource specific function call that must be applied to the attribute that will be used for sorting. i.e. - "upper(attribute_name)"

Specified by:
setFunction in interface CpoOrderBy
Parameters:
s - The name of the function

toString

public java.lang.String toString(JdbcMetaClass<?> jmc)
                          throws CpoException
Throws:
CpoException