Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-04

oracle.javatools.db.ora
Class LOBDescriptor

java.lang.Object
  extended by oracle.javatools.db.AbstractDBObject
      extended by oracle.javatools.db.AbstractChildDBObject
          extended by oracle.javatools.db.ora.LOBDescriptor
All Implemented Interfaces:
ChildDBObject, DBObject, Copyable, DynamicPropertySet

public class LOBDescriptor
extends AbstractChildDBObject

LOBDescriptor encapsulates the partitioning properties of LOB and VARRAY columns. One or more LOBDescriptor objects are held on a TablePartition object. For an overview of the table partitioning api, see OracleTablePartitions.
LOBDescriptors may be defined for an individual partition, partition level subpartition or subpartition template, although only the properties are restricted for subpartitions and hash partitions.
The following DDL shows LOB and VARRAY column definitions within a partition, partition level subpartition and subpartition template :

   create table RANGE_LIST1
    ( C1 number
    , C2 number
    , C_CLOB clob
    , C_BLOB blob
    , C_VARRAY T_VARRAY
    )
    partition by range(C1)
    subpartition by list(C2) subpartition template
      (
        subpartition RANGE_LIST1_SP1
        lob(C_CLOB) store as RANGE_LIST1_SP1_SEG1(tablespace EXAMPLE)
      )
    ( partition P100 less than(100)
        lob(C_BLOB, C_CLOB) store as (cache reads nologging)
        lob(C_VARRAY) store as RANGE_LIST1_P100_SEG1(storage(freelist groups 5) nocache)
        ( subpartition RANGE_LIST1_P100_SP1
            lob(C_CLOB) store as RANGE_LIST1_P100_SP1_SEG1(tablespace USERS)
         ,subpartition RANGE_LIST1_P100_SP2
            varray C_VARRAY store as RANGE_LIST1_P100_SP2_SEG1
        )
    )
 

A LOBDescriptor defines :

  1. LOB_SEGNAME : an optional lob segment name (also known as lob partition name).
  2. COLUMNS : When LOB_SEGNAME is specified, a single LOB or VARRAY column. When LOB_SEGNAME is null, a single VARRAY column or one or more LOB columns.
  3. STORAGE_ENABLED_IN_ROW : a boolean.
  4. CHUNK : optional integer between 1 and min( next_extent, 32768 ).
  5. PCTVERSION : optional integer between 0 and 100.
  6. RETENTION : a boolean.
  7. FREEPOOLS : optional positive integer.
  8. CACHE : optional {"CACHE", "NOCACHE", "CACHE READS"}
  9. STORAGE : an optional reference to an OracleStorageProperties object. When a LOBDescriptor is defining a LOB or VARRAY column in a list or range partiton, all OracleStorageProperties may be specified except for PCTFREE, PCTUSED, INITRANS and MAXTRANS. When a LOBDescriptor is defining a LOB or VARRAY column in a subpartition or hash partition, only TABLESPACE is valid.
When a LOBDescriptor is defining a LOB or VARRAY column in a subpartition or hash partition the only valid properties are LOB_SEGNAME, COLUMNS, and STORAGE.TABLESPACE.

In the following DDL clauses properties STORAGE_ENABLED_IN_ROW to STORAGE are designated LOB_PARAMETERS.
DDL clauses for LOB and VARRAY columns of a range or list partition

  1. lob(COLUMNS) store as (LOB_PARAMETERS)
  2. lob(COLUMNS) store as LOB_SEGNAME [(LOB_PARAMETERS)]
  3. varray COLUMNS store as (LOB_PARAMETERS)
  4. varray COLUMNS store as LOB_SEGNAME [(LOB_PARAMETERS)]
DDL clauses for LOB and VARRAY columns of a subpartiton or hash partition
  1. lob(COLUMNS) store as (tablespace STORAGE.TABLESPACE)
  2. lob(COLUMNS) store as LOB_SEGNAME [(tablespace STORAGE.TABLESPACE)]
  3. varray COLUMNS store as LOB_SEGNAME

Since:
11.0

Nested Class Summary
 
Nested classes/interfaces inherited from class oracle.javatools.db.AbstractDBObject
AbstractDBObject.ChildSupport
 
Field Summary
static java.lang.String LOB_PARAMETER_CACHE
           
static java.lang.String LOB_PARAMETER_CACHEREADS
           
static java.lang.String LOB_PARAMETER_NOCACHE
           
static java.lang.String TYPE
           
 
Fields inherited from interface oracle.javatools.db.DBObject
COMMENT
 
Constructor Summary
LOBDescriptor()
           
 
Method Summary
 void addColumn(DBObjectID column)
          Add a column to the column list.
 DBObject copyTo(DBObject target, DBObject copyParent, IDPolicy idPolicy)
          Internal copy method used by the API to perform copy operations.
protected  void copyToImpl(LOBDescriptor target, DBObject copyParent, IDPolicy idPolicy)
           
 boolean equals(java.lang.Object target)
           
protected  boolean equalsImpl(LOBDescriptor target)
           
static LOBDescriptor findLOBDescriptorForColumn(Column column)
           
 java.lang.String getCache()
          return the value of CACHE
 java.lang.Integer getChunk()
          Return the value of CHUNK.
 DBObjectID[] getColumns()
           
 java.lang.Integer getFreepools()
          Return the value of FREEPOOLS
 java.lang.String getLOBSegName()
           
 java.lang.String getName()
          Retrieves the name of this object.
protected  void getOwnedObjectsImpl(java.util.Collection<DBObject> objs, java.lang.String... types)
          Used by all the final children methods.
 java.lang.Integer getPctVersion()
          Return the value of PCTVERSION.
protected  void getReferenceIDsImpl(java.util.Collection<DBObjectID> refs)
          Used by the final getReferenceID() implementation.
 OracleStorageProperties getStorage()
           
 java.lang.String getType()
          Returns the type of this object.
static boolean isLOBColumn(Column column)
           
static boolean isLOBColumn(DBObjectID colID)
           
 boolean isRetention()
           
 boolean isStorageEnabledInRow()
           
static boolean isVARRAYColumn(Column column)
           
static boolean isVARRAYColumn(DBObjectID colID)
           
 void removeColumn(DBObjectID column)
          Remove a column from the column list.
 boolean replaceReferenceIDs(java.util.Map<DBObjectID,DBObjectID> idMap)
          Override in subclasses to replace reference IDs as appropriate.
 void setCache(java.lang.String cache)
          Set the value of CACHE
 void setChunk(java.lang.Integer chunk)
          Set the value of CHUNK.
 void setColumns(DBObjectID[] columns)
          Replace the column list.
 void setFreepools(java.lang.Integer freepools)
          Set the value of FREEPOOLS.
 void setLOBSegName(java.lang.String name)
           
 void setPctVersion(java.lang.Integer pctVersion)
          Set the value of PCTVERSION.
 void setRetention(boolean retention)
           
 void setStorage(OracleStorageProperties storage)
           
 void setStorageEnabledInRow(boolean storageEnabledInRow)
           
 
Methods inherited from class oracle.javatools.db.AbstractChildDBObject
copyToImpl, findParent, getParent, setParent
 
Methods inherited from class oracle.javatools.db.AbstractDBObject
changeParent, compareToImpl, copyObject, copyTo, copyTo, copyTo, copyToImpl, equalsImpl, findOwnedObject, findOwnedObject, findOwnedObject, getChildSupport, getID, getOwnedObjects, getOwnedObjects, getProperties, getProperty, getProperty, getReferenceIDs, hashCode, includeOwnedObject, includesType, includesType, removeThisAsParent, setID, setName, setProperties, setProperty, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface oracle.javatools.db.DBObject
copyTo, copyTo, copyTo, findOwnedObject, findOwnedObject, getID, getOwnedObjects, getOwnedObjects, getReferenceIDs, setID, setName
 
Methods inherited from interface oracle.javatools.util.DynamicPropertySet
getProperties, getProperty, getProperty, setProperties, setProperty
 

Field Detail

TYPE

public static final java.lang.String TYPE
See Also:
Constant Field Values

LOB_PARAMETER_CACHE

public static final java.lang.String LOB_PARAMETER_CACHE
See Also:
Constant Field Values

LOB_PARAMETER_NOCACHE

public static final java.lang.String LOB_PARAMETER_NOCACHE
See Also:
Constant Field Values

LOB_PARAMETER_CACHEREADS

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

LOBDescriptor

public LOBDescriptor()
Method Detail

copyTo

public DBObject copyTo(DBObject target,
                       DBObject copyParent,
                       IDPolicy idPolicy)
Description copied from class: AbstractDBObject
Internal copy method used by the API to perform copy operations. All objects must implement this method if they are instantiable objects. Abstract objects (e.g. Relation) must NOT implement this method. The implementation should delegate to the copyToImpl method to copy the actual properties.

This method does not fix internal reference ids on copy. That is done by the calling DBObject.copyTo(DBObject, IDPolicy) method.

Specified by:
copyTo in class AbstractDBObject
See Also:
DBObject.copyTo(java.lang.Object), DBObject.copyTo(DBObject, boolean), AbstractDBObject.copyToImpl(oracle.javatools.db.AbstractDBObject, oracle.javatools.db.DBObject, oracle.javatools.db.IDPolicy)

getName

public java.lang.String getName()
Description copied from interface: DBObject
Retrieves the name of this object.

Specified by:
getName in interface DBObject
Overrides:
getName in class AbstractDBObject
Returns:
a string containing the name of this object.

equals

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

getType

public java.lang.String getType()
Description copied from interface: DBObject
Returns the type of this object. Valid types include things like tables, views, synonyms, and columns.

Returns:
a string describing the type of object.

setLOBSegName

public void setLOBSegName(java.lang.String name)

getLOBSegName

public java.lang.String getLOBSegName()

setColumns

public void setColumns(DBObjectID[] columns)
Replace the column list. When LOB_SEGNAME is specified, only a single LOB or VARRAY column is allowed. When LOB_SEGNAME is null, a single VARRAY column or one or more LOB columns is allowed.

Parameters:
columns -

getColumns

public DBObjectID[] getColumns()

addColumn

public void addColumn(DBObjectID column)
Add a column to the column list. When LOB_SEGNAME is specified, only a single LOB or VARRAY column is allowed. When LOB_SEGNAME is null, a single VARRAY column or one or more LOB columns is allowed.

Parameters:
column -

removeColumn

public void removeColumn(DBObjectID column)
Remove a column from the column list.

Parameters:
column -

setChunk

public void setChunk(java.lang.Integer chunk)
Set the value of CHUNK.

Parameters:
chunk - : null or an integer between 1 and min( next_extent, 32768 ).

getChunk

public java.lang.Integer getChunk()
Return the value of CHUNK.

Returns:
null or an integer between 1 and min( next_extent, 32768 ).

setPctVersion

public void setPctVersion(java.lang.Integer pctVersion)
Set the value of PCTVERSION.

Parameters:
pctVersion - : null or an integer between 0 and 100

getPctVersion

public java.lang.Integer getPctVersion()
Return the value of PCTVERSION.

Returns:
null or an integer between 0 and 100

setFreepools

public void setFreepools(java.lang.Integer freepools)
Set the value of FREEPOOLS. Only one of FREEPOOLS and STORAGE(FREELIST GROUPS) may be specified.

Parameters:
freepools - : null or a positive integer

getFreepools

public java.lang.Integer getFreepools()
Return the value of FREEPOOLS

Returns:
null or a positive integer

setStorage

public void setStorage(OracleStorageProperties storage)

getStorage

public OracleStorageProperties getStorage()

setRetention

public void setRetention(boolean retention)

isRetention

public boolean isRetention()

setStorageEnabledInRow

public void setStorageEnabledInRow(boolean storageEnabledInRow)

isStorageEnabledInRow

public boolean isStorageEnabledInRow()

setCache

public void setCache(java.lang.String cache)
Set the value of CACHE

Parameters:
cache - : null or one of {"CACHE", "NOCACHE", "CACHE READS"}

getCache

public java.lang.String getCache()
return the value of CACHE

Returns:
null or one of {"CACHE", "NOCACHE", "CACHE READS"}

replaceReferenceIDs

public boolean replaceReferenceIDs(java.util.Map<DBObjectID,DBObjectID> idMap)
Description copied from class: AbstractDBObject
Override in subclasses to replace reference IDs as appropriate. Always call super in the overridden implementation to make sure the default implementation (which checks the property map) is called.

Specified by:
replaceReferenceIDs in interface DBObject
Overrides:
replaceReferenceIDs in class AbstractDBObject
Parameters:
idMap - key = old DBObjectID, value = new DBObjectID
Returns:
true if any ids were replaced.

isLOBColumn

public static boolean isLOBColumn(DBObjectID colID)

isLOBColumn

public static boolean isLOBColumn(Column column)

isVARRAYColumn

public static boolean isVARRAYColumn(DBObjectID colID)

isVARRAYColumn

public static boolean isVARRAYColumn(Column column)

copyToImpl

protected void copyToImpl(LOBDescriptor target,
                          DBObject copyParent,
                          IDPolicy idPolicy)

equalsImpl

protected boolean equalsImpl(LOBDescriptor target)

getReferenceIDsImpl

protected void getReferenceIDsImpl(java.util.Collection<DBObjectID> refs)
Description copied from class: AbstractDBObject
Used by the final getReferenceID() implementation. The list should not contain null values, or be null. Subclasses should start with super.getReferenceIDsImpl() and then add to the passed list as appopriate.

Overrides:
getReferenceIDsImpl in class AbstractDBObject
Parameters:
refs - the collection of ids this object references

getOwnedObjectsImpl

protected void getOwnedObjectsImpl(java.util.Collection<DBObject> objs,
                                   java.lang.String... types)
Description copied from class: AbstractDBObject
Used by all the final children methods. Subclasses should start with super.getOwnedObjectsImpl(type) and then add to the passed list. Use includesType to check the types vararg.

Overrides:
getOwnedObjectsImpl in class AbstractDBObject
Parameters:
objs - a Collection of the apppropriate children.
types - a vararg of the type(s) to search for
See Also:
AbstractDBObject.includesType(java.lang.String, java.lang.String...)

findLOBDescriptorForColumn

public static LOBDescriptor findLOBDescriptorForColumn(Column column)

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-04

Copyright © 1997, 2010, Oracle. All rights reserved.