Oracle Fusion Middleware extensions for Enterprise Scheduler Service
11g Release 1 (11.1.1.5)

E22563-01

oracle.apps.fnd.applcp.migrate.modeler.common
Class CustomValueSetDefImpl

java.lang.Object
  extended by oracle.apps.fnd.applcp.migrate.modeler.common.ValueSetDefImpl
      extended by oracle.apps.fnd.applcp.migrate.modeler.common.CustomValueSetDefImpl
All Implemented Interfaces:
CustomValueSetDef, ValueSetDef

public class CustomValueSetDefImpl
extends ValueSetDefImpl
implements CustomValueSetDef

Represents a custom value set from a database table.


Nested Class Summary
 
Nested classes/interfaces inherited from interface oracle.apps.fnd.applcp.migrate.modeler.common.CustomValueSetDef
CustomValueSetDef.BindVariable, CustomValueSetDef.BoundValueType, CustomValueSetDef.Column, CustomValueSetDef.ColumnContentType
 
Nested classes/interfaces inherited from interface oracle.apps.fnd.applcp.migrate.modeler.common.ValueSetDef
ValueSetDef.ValueSetType
 
Field Summary
 
Fields inherited from interface oracle.apps.fnd.applcp.migrate.modeler.common.ValueSetDef
TRANSIENT_VALUE_SET_ID
 
Constructor Summary
CustomValueSetDefImpl(long id, java.lang.String code, java.lang.String fromClause, ValueType vt)
          Constructs a custom value-set definition.
 
Method Summary
 ValueSetUsage createUsage(boolean isNullAllowed)
          Creates a value-set usage of this value-set definition.
 java.util.List<CustomValueSetDef.BindVariable> getBindVariables()
          Gets the list of bind variables if any.
 CustomValueSetDef.Column getColumn(CustomValueSetDef.ColumnContentType ctype)
          Gets the column of a specific content type.
 java.lang.String getFromClause()
          Gets the FROM clause of the SQL statement that fetches the values.
 java.lang.String getOrderByClause()
          Gets the ORDERBY clause of the SQL statement that fetches the values.
 java.lang.String getTableAliasForValueAttributes()
          Gets the table alias used to prefix the value attribute column names.
 java.lang.String getWhereClause()
          Gets the WHERE clause of the SQL statement that fetches the values.
 boolean isJavaTypeSupported(java.lang.Class type)
          Checks whether values of a Java type are supported by this value set.
protected  void setBindVariables(java.util.List<CustomValueSetDef.BindVariable> list)
          Sets the list of bind variables.
protected  CustomValueSetDef.Column setColumn(CustomValueSetDef.ColumnContentType ctype, java.lang.String name, java.lang.String dtype)
          Sets the column of a specific content type.
protected  void setOrderByClause(java.lang.String orderByClause)
          Sets the ORDERBY clause of the SQL statement that fetches the values.
protected  void setTableAliasForValueAttributes(java.lang.String alias)
          Sets the table alias used to prefix the value-attribute columns.
protected  void setWhereClause(java.lang.String whereClause)
          Sets the WHERE clause of the SQL statement that fetches the values.
 
Methods inherited from class oracle.apps.fnd.applcp.migrate.modeler.common.ValueSetDefImpl
addSegmentLabelCode, getCode, getDataSecurityViewCriteriaName, getID, getReferenceValueSetID, getSegmentLabelCodes, getType, getUIControlType, getValueType, isDiscriminator, isTransient, setDataSecurityViewCriteriaName, setDiscriminator, setReferenceValueSetID, setUIControlType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface oracle.apps.fnd.applcp.migrate.modeler.common.ValueSetDef
getCode, getDataSecurityViewCriteriaName, getID, getReferenceValueSetID, getSegmentLabelCodes, getType, getUIControlType, getValueType, isDiscriminator, isTransient
 

Constructor Detail

CustomValueSetDefImpl

public CustomValueSetDefImpl(long id,
                             java.lang.String code,
                             java.lang.String fromClause,
                             ValueType vt)
Constructs a custom value-set definition.

Parameters:
id - the value-set ID
code - the value-set code
fromClause - the FROM clause of the SQL statement that fetches the values
vt - the type of the values
Method Detail

createUsage

public ValueSetUsage createUsage(boolean isNullAllowed)
Creates a value-set usage of this value-set definition.

Specified by:
createUsage in interface ValueSetDef
Overrides:
createUsage in class ValueSetDefImpl
Parameters:
isNullAllowed - true if null value is allowed
Returns:
a value-set usage

getFromClause

public java.lang.String getFromClause()
Gets the FROM clause of the SQL statement that fetches the values.

Specified by:
getFromClause in interface CustomValueSetDef
Returns:
the FROM clause

setWhereClause

protected void setWhereClause(java.lang.String whereClause)
Sets the WHERE clause of the SQL statement that fetches the values.

Parameters:
whereClause - the WHERE clause

getWhereClause

public java.lang.String getWhereClause()
Gets the WHERE clause of the SQL statement that fetches the values.

Specified by:
getWhereClause in interface CustomValueSetDef
Returns:
the WHERE clause; null if WHERE clause is not needed

setOrderByClause

protected void setOrderByClause(java.lang.String orderByClause)
Sets the ORDERBY clause of the SQL statement that fetches the values.

Parameters:
orderByClause - the ORDERBY clause; null if ORDERBY clause is not needed

getOrderByClause

public java.lang.String getOrderByClause()
Gets the ORDERBY clause of the SQL statement that fetches the values.

Specified by:
getOrderByClause in interface CustomValueSetDef
Returns:
the ORDERBY clause

isJavaTypeSupported

public boolean isJavaTypeSupported(java.lang.Class type)
Description copied from class: ValueSetDefImpl
Checks whether values of a Java type are supported by this value set.

Specified by:
isJavaTypeSupported in interface ValueSetDef
Overrides:
isJavaTypeSupported in class ValueSetDefImpl
Parameters:
type - the JAva type
Returns:
true if values of the given Java type are supported by this value set

setColumn

protected CustomValueSetDef.Column setColumn(CustomValueSetDef.ColumnContentType ctype,
                                             java.lang.String name,
                                             java.lang.String dtype)
Sets the column of a specific content type.

Parameters:
ctype - the content type
name - the name of the column
dtype - the database type of the column
Returns:
the column set
Throws:
java.lang.IllegalArgumentException - if the given column name or type is invalid

getColumn

public CustomValueSetDef.Column getColumn(CustomValueSetDef.ColumnContentType ctype)
Gets the column of a specific content type.

Specified by:
getColumn in interface CustomValueSetDef
Parameters:
ctype - the content type
Returns:
the column of the content type

setBindVariables

protected void setBindVariables(java.util.List<CustomValueSetDef.BindVariable> list)
Sets the list of bind variables. Please note that this object does not copy the list. It simply stores the reference to the list. This means that if the list is changed externally, getBindVariables will reflect that change. To prevent this from happening, the caller should make an immutable copy first before calling this method.

Parameters:
list - the list of bind variables

getBindVariables

public java.util.List<CustomValueSetDef.BindVariable> getBindVariables()
Gets the list of bind variables if any. An empty list should be returned if there's no bind variables.

Specified by:
getBindVariables in interface CustomValueSetDef
Returns:
the list of bind variables

setTableAliasForValueAttributes

protected void setTableAliasForValueAttributes(java.lang.String alias)
Sets the table alias used to prefix the value-attribute columns.

Parameters:
alias - the table alias

getTableAliasForValueAttributes

public java.lang.String getTableAliasForValueAttributes()
Gets the table alias used to prefix the value attribute column names.

Specified by:
getTableAliasForValueAttributes in interface CustomValueSetDef
Returns:
the table alias for value attributes; null if no alias is needed

Oracle Fusion Middleware extensions for Enterprise Scheduler Service
11g Release 1 (11.1.1.5)

E22563-01

Copyright © 2011 Oracle. All Rights Reserved.