com.esri.sde.sdk.client
Class SeLayer

java.lang.Object
  extended by com.esri.sde.sdk.client.SeLayer
All Implemented Interfaces:
java.lang.Cloneable

public class SeLayer
extends java.lang.Object
implements java.lang.Cloneable

SeLayer - An object that spatially enables an existing RDBMS table. The term spatially enable means adding spatial information to any RDBMS table. It designates a column as the spatial column. If the the spatial column does not exist, ArcSDE will add it. If it does exist, all rows must have a NULL value and the column must be of integer type. It also builds a spatial index and other tables that ArcSDE requires to store spatial information. Spatial information includes the type of spatial feature such as area or line, projection information, false origins, units of measure, and geographic extent.


Nested Class Summary
static class SeLayer.SeLayerGridStats
          SeLayer inner class that retrieves the spatial index grid statistics.
static class SeLayer.SeLayerLock
          SeLayer inner class that retrieves the layer lock information from the ArcSDE server.
static class SeLayer.SeLayerSpatialIndexStats
          SeLayer inner class that retrieves the spatial index statistics for a layer.
static class SeLayer.SeLayerStats
          SeLayer inner class that obtains the statistics for a layer.
 
Field Summary
static int GSIZE_MULT
          The grid size multiple; when creating a layer with grid indexes, each successive grid size must be greater than the product of the previous grid size and this multiple.
static int SE_AREA_TYPE_MASK
          One of the allowable shape types for a layer, representing area or polygon shapes.
static int SE_LAYER_AUTO_REGISTER
           
static int SE_LAYER_HAS_GEODETIC_EXTENT
           
static int SE_LAYER_HAS_USER_DEFINED_EXTENT
           
static int SE_LAYER_PRECISION_32_BIT
          Deprecated. at ArcSDE v9.2, replaced by SE_LAYER_PRECISION_BASIC
static int SE_LAYER_PRECISION_64_BIT
          Deprecated. at ArcSDE v9.2, replaced by SE_LAYER_PRECISION_HIGH
static int SE_LAYER_PRECISION_BASIC
           
static int SE_LAYER_PRECISION_DEFAULT
           
static int SE_LAYER_PRECISION_HIGH
           
static int SE_LINE_TYPE_MASK
          One of the allowable shape types for a layer, representing line shapes.
static int SE_MIN_GRIDSIZE
          This constant defines the minimum grid size value allowed when creating the grid indexes for a layer.
static int SE_MULTIPART_TYPE_MASK
          One of the allowable shape types for a layer, representing multi-part shapes.
static int SE_NIL_TYPE_MASK
          One of the allowable shape types for a layer, representing nil shapes.
static int SE_POINT_TYPE_MASK
          One of the allowable shape types for a layer, representing point shapes.
static int SE_READ_LOCK
          One of the allowable locks on a layer.
static int SE_SHAPE_ATTRIBUTE_AREA
          Represents the area attribute of a shape.
static int SE_SHAPE_ATTRIBUTE_ENTITY
          Represents the entity attribute of a shape.
static int SE_SHAPE_ATTRIBUTE_FID
          Represents the feature id attribute of a shape.
static int SE_SHAPE_ATTRIBUTE_LENGTH
          Represents the length attribute of a shape.
static int SE_SHAPE_ATTRIBUTE_MMAX
          Represents the maximum measure attribute of a shape.
static int SE_SHAPE_ATTRIBUTE_MMIN
          Represents the minimum measure attribute of a shape.
static int SE_SHAPE_ATTRIBUTE_NUMOFPTS
          Represents the number of points attribute of a shape.
static int SE_SHAPE_ATTRIBUTE_TEXT
          Represents the text attribute of a shape.
static int SE_SHAPE_ATTRIBUTE_XMAX
          Represents the maximum x attribute of a shape.
static int SE_SHAPE_ATTRIBUTE_XMIN
          Represents the minimum x value attribute of a shape.
static int SE_SHAPE_ATTRIBUTE_YMAX
          Represents the maximum y attribute of a shape.
static int SE_SHAPE_ATTRIBUTE_YMIN
          Represents the minimum y attribute of a shape.
static int SE_SHAPE_ATTRIBUTE_ZMAX
          Represents the maximum z attribute of a shape.
static int SE_SHAPE_ATTRIBUTE_ZMIN
          Represents the minimum z attribute of a shape.
static int SE_SIMPLE_LINE_TYPE_MASK
          One of the allowable shape types for a layer, representing simple line shapes.
static int SE_SPATIALINDEX_DBTUNE
          One of the allowable spatial index types.
static int SE_SPATIALINDEX_FIXED_QUADTREE
          One of the allowable spatial index types.
static int SE_SPATIALINDEX_HYBRID_QUADTREE
          One of the allowable spatial index types.
static int SE_SPATIALINDEX_MULTI_GRID
          One of the allowable spatial index types.
static int SE_SPATIALINDEX_NONE
          One of the allowable spatial index types.
static int SE_SPATIALINDEX_RTREE
          One of the allowable spatial index types.
static int SE_SPATIALINDEX_SQL_SERVER
           
static int SE_SPATIALINDEX_UNKNOWN
           
static int SE_STORAGE_LOB_TYPE
           
static int SE_STORAGE_NORMALIZED_TYPE
           
static int SE_STORAGE_SDEBINARY_TYPE
           
static int SE_STORAGE_SPATIAL_TYPE
           
static int SE_STORAGE_SQL_TYPE
           
static int SE_STORAGE_WKB_TYPE
           
static int SE_WRITE_LOCK
          One of the allowable locks on a layer.
static int TYPE_LINE
           
static int TYPE_MULTI_LINE
           
static int TYPE_MULTI_MASK
           
static int TYPE_MULTI_POINT
           
static int TYPE_MULTI_POLYGON
           
static int TYPE_MULTI_SIMPLE_LINE
           
static int TYPE_NIL
           
static int TYPE_POINT
           
static int TYPE_POLYGON
           
static int TYPE_SIMPLE_LINE
           
 
Constructor Summary
SeLayer(SeConnection conn)
          This constructor is used to create a new ArcSDE layer.
SeLayer(SeConnection conn, SeObjectId layerId)
          This SeLayer constructor is used to retrieve the properties of a layer from an ArcSDE server.
SeLayer(SeConnection conn, java.lang.String table, java.lang.String spatCol)
          This SeLayer constructor is used to retrieve the properties of a layer from an ArcSDE server.
 
Method Summary
 void alter()
          Alters modifiable characteristics of a layer after creation.
 SeExtent calculateExtent(boolean useIndex, SeSqlConstruct sqlC)
          Calculates the extent (the minimum bounding box) of the features in a layer.
 java.lang.Object clone()
          Clones this SeLayer object.
 void create(int initialFeatures, int avgPoints)
          Spatially enables an RDBMS table.
 void delete()
          Deletes the spatial components from a spatially enabled table.
 void freeLock()
          Frees the lock on an ArcSde layer.
 int getAccess()
          Retrieves the privilege bitmask for a layer.
 int getArraySize()
          Retrieves the optimal array size for the specified layer.
 SeCoordinateReference getCoordRef()
          Retrieves the coordinate reference for the specified layer.
 java.util.Date getCreationDate()
          Retrieves the layer creation date.
 int getCreationDateInMillis()
          Retrieves the layer creation date.
 java.lang.String getCreationKeyword()
          Retrieves the configuration keyword.
 java.lang.String getDescription()
          Retrieves the layer's description.
 SeExtent getExtent()
          Retrieves the layer's envelope.
 double[] getGridSizes()
          Returns an array of layer's grid sizes.
 SeObjectId getID()
          Retrieves the layer ID.
 void getInfo()
          Refreshes the properties of this SeLayer object by reading them from the ArcSDE server.
 SeLayer.SeLayerLock[] getLocks()
          Returns a list of current locks.
 double getMaxM()
          Returns the maximum measure value.
 double getMaxZ()
          Returns the maximum elevation value.
 SeObjectId getMinID()
          Retrieves the minimum FID id.
 double getMinM()
          Returns the minimum measure value.
 double getMinZ()
          Returns the minimum elevation value.
 java.lang.String getName()
          Returns the name of the table associated with the layer.
 java.lang.String getQualifiedName()
          Returns the layer's table name, qualified with the owner.
 java.lang.String getShapeAttributeName(int attrCode)
          Returns the column name for a specified shape attribute.
 int getShapeTypes()
          Retrieves the allowed shape types.
 java.lang.String getSpatialColumn()
          Retrieves the spatial column name of a layer.
 SeLayer.SeLayerSpatialIndexStats getSpatialIndexStats()
          Returns statistical information about a layer's spatial indexes.
 int getStatsDate()
          Retrieves the stats date for the specified layer.
 java.lang.String getTableName()
          Returns the name of the table associated with the layer.
 void grantAccess(int privilege, boolean grant, java.lang.String user)
          Grants specified privileges to the specified user.
 boolean hasAnno()
          Returns TRUE if a layer has annotation.
 boolean hasCAD()
          Returns TRUE if the layer allows CAD.
 boolean hasSparseGrids()
          This routine returns true if the layer object is configured so that sparse grid indexes are generated for this layer.
 boolean hasSpatialIndex()
          Returns TRUE if the layer has spatial index.
 boolean is3D()
          Returns TRUE if the layer allows z-coordinates.
 boolean isLine()
          Returns TRUE if the layer has line shapes.
 boolean isLoadOnly()
          Returns TRUE if the layer is in load-only mode.
 boolean isMeasured()
          Returns TRUE if the layer allows measures.
 boolean isMultiPart()
          Returns TRUE if the layer has multipart enabled.
 boolean isPoint()
          Returns TRUE if the layer has point shapes.
 boolean isPoly()
          Returns TRUE if the layer has polygon shapes.
 boolean isStorageExternal()
          Returns TRUE if the layers storage type is external.
 boolean isStorageLOB()
          Returns TRUE if the layer's storage type is LOB type.
 boolean isStorageNormalized()
          Returns TRUE if the layer's storage type is normalized.
 boolean isStorageSdeBinary()
          Returns TRUE if the layer's storage type is sdebinary.
 boolean isStorageSpatial()
          Returns TRUE if the layer's storage type is spatial type.
 boolean isStorageSQL()
          Returns TRUE if the layer's storage type is SQL or well-known text.
 boolean isStorageWKB()
          Returns TRUE if the layer's storage type is well-known binary.
 void lock(int lockMode)
          Locks an ArcSde layer.
 void lockArea(int lockMode, SeExtent envelope)
          Locks the specified area within ArcSde layer.
 void migrateStorage(java.lang.String config_keyword)
          Migrates a layer's geometry storage type from one type of storage to another based on the configuration keyword specified.
 void modifyLock(int lockMode, SeExtent envelope)
          Modifies an existing lock on an area or the entire layer.
 void revokeAccess(int privilege, java.lang.String user)
          Revokes specified privileges from the specified user.
 void set3D(boolean is3D)
          Updates whether the layer allows z-coordinates.
 void setAnno(boolean hasAnno)
          Sets whether the layer allows anno.
 void setArraySize(int optArraySize)
          Sets the optimal array size for the layer.
 void setCAD(boolean hasCAD)
          Sets whether the layer allows CAD entities.
 void setCoordRef(SeCoordinateReference coordref)
          Sets the coordinate reference for the specified layer.
 void setCreationKeyword(java.lang.String configKeyword)
          Sets the configuration keyword.
 void setDescription(java.lang.String description)
          Sets the layer's description.
 void setExtent(SeExtent envelope)
          Sets the layer's envelope.
 void setGridSizes(double grid1, double grid2, double grid3)
          Sets the spatial index grid sizes of the layer.
 void setLoadMode(boolean isLoadOnly)
          Sets the layer to either load-only or normal I/O mode.
 void setMeasured(boolean isMeasured)
          Updates whether the layer allows measures.
 void setMinID(SeObjectId minID)
          Sets the minimum fid value.
 void setMRange(double minM, double maxM)
          Sets the M (measurement) range for this Layer.
 void setSecondaryCoordRef(SeCoordinateReference coordref)
          Sets the coordinate reference for the specified layer.
 void setShapeTypes(int shapeTypes)
          Sets shape types.
 void setSparseGrids(boolean sparseGrids)
          This routine configures the LAYERINFO object to allow or disallow the generation of sparse spatial index grids.
 void setSpatialColumnName(java.lang.String spatialColName)
          Sets the spatial column name of the layer.
 void setStorageTypes(int storageTypes)
          Sets storage types.
 void setTableName(java.lang.String tableName)
          Sets the business table containaing spatial column.
 void setZRange(double minZ, double maxZ)
          Sets the Z (elevation) range for this Layer.
 void truncate()
          Deletes the shapes of a spatially enabled table's spatial column.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_NIL

public static final int TYPE_NIL
See Also:
Constant Field Values

TYPE_POINT

public static final int TYPE_POINT
See Also:
Constant Field Values

TYPE_LINE

public static final int TYPE_LINE
See Also:
Constant Field Values

TYPE_SIMPLE_LINE

public static final int TYPE_SIMPLE_LINE
See Also:
Constant Field Values

TYPE_POLYGON

public static final int TYPE_POLYGON
See Also:
Constant Field Values

TYPE_MULTI_MASK

public static final int TYPE_MULTI_MASK
See Also:
Constant Field Values

TYPE_MULTI_POINT

public static final int TYPE_MULTI_POINT
See Also:
Constant Field Values

TYPE_MULTI_LINE

public static final int TYPE_MULTI_LINE
See Also:
Constant Field Values

TYPE_MULTI_SIMPLE_LINE

public static final int TYPE_MULTI_SIMPLE_LINE
See Also:
Constant Field Values

TYPE_MULTI_POLYGON

public static final int TYPE_MULTI_POLYGON
See Also:
Constant Field Values

SE_NIL_TYPE_MASK

public static final int SE_NIL_TYPE_MASK
One of the allowable shape types for a layer, representing nil shapes.

See Also:
Constant Field Values

SE_POINT_TYPE_MASK

public static final int SE_POINT_TYPE_MASK
One of the allowable shape types for a layer, representing point shapes.

See Also:
Constant Field Values

SE_LINE_TYPE_MASK

public static final int SE_LINE_TYPE_MASK
One of the allowable shape types for a layer, representing line shapes.

See Also:
Constant Field Values

SE_SIMPLE_LINE_TYPE_MASK

public static final int SE_SIMPLE_LINE_TYPE_MASK
One of the allowable shape types for a layer, representing simple line shapes.

See Also:
Constant Field Values

SE_AREA_TYPE_MASK

public static final int SE_AREA_TYPE_MASK
One of the allowable shape types for a layer, representing area or polygon shapes.

See Also:
Constant Field Values

SE_MULTIPART_TYPE_MASK

public static final int SE_MULTIPART_TYPE_MASK
One of the allowable shape types for a layer, representing multi-part shapes.

See Also:
Constant Field Values

SE_STORAGE_NORMALIZED_TYPE

public static final int SE_STORAGE_NORMALIZED_TYPE
See Also:
Constant Field Values

SE_STORAGE_SDEBINARY_TYPE

public static final int SE_STORAGE_SDEBINARY_TYPE
See Also:
Constant Field Values

SE_STORAGE_WKB_TYPE

public static final int SE_STORAGE_WKB_TYPE
See Also:
Constant Field Values

SE_STORAGE_SQL_TYPE

public static final int SE_STORAGE_SQL_TYPE
See Also:
Constant Field Values

SE_STORAGE_SPATIAL_TYPE

public static final int SE_STORAGE_SPATIAL_TYPE
See Also:
Constant Field Values

SE_STORAGE_LOB_TYPE

public static final int SE_STORAGE_LOB_TYPE
See Also:
Constant Field Values

SE_WRITE_LOCK

public static final int SE_WRITE_LOCK
One of the allowable locks on a layer. SE_WRITE_LOCK allows only the caller to modify the data. The layer can still be read by all other users. Only one SE_WRITE_LOCK lock at a time may exist on a layer.

See Also:
Constant Field Values

SE_READ_LOCK

public static final int SE_READ_LOCK
One of the allowable locks on a layer. SE_READ_LOCK locks the layer against modifications. Multiple SE_READ_LOCK locks can be set on the same layer.

See Also:
Constant Field Values

SE_SPATIALINDEX_MULTI_GRID

public static final int SE_SPATIALINDEX_MULTI_GRID
One of the allowable spatial index types.

See Also:
setGridSizes(double, double, double), Constant Field Values

SE_SPATIALINDEX_DBTUNE

public static final int SE_SPATIALINDEX_DBTUNE
One of the allowable spatial index types.

See Also:
setGridSizes(double, double, double), Constant Field Values

SE_SPATIALINDEX_NONE

public static final int SE_SPATIALINDEX_NONE
One of the allowable spatial index types.

See Also:
setGridSizes(double, double, double), Constant Field Values

SE_SPATIALINDEX_RTREE

public static final int SE_SPATIALINDEX_RTREE
One of the allowable spatial index types.

See Also:
setGridSizes(double, double, double), Constant Field Values

SE_SPATIALINDEX_FIXED_QUADTREE

public static final int SE_SPATIALINDEX_FIXED_QUADTREE
One of the allowable spatial index types.

See Also:
setGridSizes(double, double, double), Constant Field Values

SE_SPATIALINDEX_HYBRID_QUADTREE

public static final int SE_SPATIALINDEX_HYBRID_QUADTREE
One of the allowable spatial index types.

See Also:
setGridSizes(double, double, double), Constant Field Values

SE_SPATIALINDEX_UNKNOWN

public static final int SE_SPATIALINDEX_UNKNOWN
See Also:
Constant Field Values

SE_SPATIALINDEX_SQL_SERVER

public static final int SE_SPATIALINDEX_SQL_SERVER
See Also:
Constant Field Values

SE_MIN_GRIDSIZE

public static final int SE_MIN_GRIDSIZE
This constant defines the minimum grid size value allowed when creating the grid indexes for a layer.

See Also:
Constant Field Values

GSIZE_MULT

public static final int GSIZE_MULT
The grid size multiple; when creating a layer with grid indexes, each successive grid size must be greater than the product of the previous grid size and this multiple.

See Also:
Constant Field Values

SE_SHAPE_ATTRIBUTE_NUMOFPTS

public static final int SE_SHAPE_ATTRIBUTE_NUMOFPTS
Represents the number of points attribute of a shape.

See Also:
getShapeAttributeName(int), Constant Field Values

SE_SHAPE_ATTRIBUTE_ENTITY

public static final int SE_SHAPE_ATTRIBUTE_ENTITY
Represents the entity attribute of a shape.

See Also:
getShapeAttributeName(int), Constant Field Values

SE_SHAPE_ATTRIBUTE_XMIN

public static final int SE_SHAPE_ATTRIBUTE_XMIN
Represents the minimum x value attribute of a shape.

See Also:
getShapeAttributeName(int), Constant Field Values

SE_SHAPE_ATTRIBUTE_XMAX

public static final int SE_SHAPE_ATTRIBUTE_XMAX
Represents the maximum x attribute of a shape.

See Also:
getShapeAttributeName(int), Constant Field Values

SE_SHAPE_ATTRIBUTE_YMIN

public static final int SE_SHAPE_ATTRIBUTE_YMIN
Represents the minimum y attribute of a shape.

See Also:
getShapeAttributeName(int), Constant Field Values

SE_SHAPE_ATTRIBUTE_YMAX

public static final int SE_SHAPE_ATTRIBUTE_YMAX
Represents the maximum y attribute of a shape.

See Also:
getShapeAttributeName(int), Constant Field Values

SE_SHAPE_ATTRIBUTE_ZMIN

public static final int SE_SHAPE_ATTRIBUTE_ZMIN
Represents the minimum z attribute of a shape.

See Also:
getShapeAttributeName(int), Constant Field Values

SE_SHAPE_ATTRIBUTE_ZMAX

public static final int SE_SHAPE_ATTRIBUTE_ZMAX
Represents the maximum z attribute of a shape.

See Also:
getShapeAttributeName(int), Constant Field Values

SE_SHAPE_ATTRIBUTE_MMIN

public static final int SE_SHAPE_ATTRIBUTE_MMIN
Represents the minimum measure attribute of a shape.

See Also:
getShapeAttributeName(int), Constant Field Values

SE_SHAPE_ATTRIBUTE_MMAX

public static final int SE_SHAPE_ATTRIBUTE_MMAX
Represents the maximum measure attribute of a shape.

See Also:
getShapeAttributeName(int), Constant Field Values

SE_SHAPE_ATTRIBUTE_AREA

public static final int SE_SHAPE_ATTRIBUTE_AREA
Represents the area attribute of a shape.

See Also:
getShapeAttributeName(int), Constant Field Values

SE_SHAPE_ATTRIBUTE_LENGTH

public static final int SE_SHAPE_ATTRIBUTE_LENGTH
Represents the length attribute of a shape.

See Also:
getShapeAttributeName(int), Constant Field Values

SE_SHAPE_ATTRIBUTE_TEXT

public static final int SE_SHAPE_ATTRIBUTE_TEXT
Represents the text attribute of a shape.

See Also:
getShapeAttributeName(int), Constant Field Values

SE_SHAPE_ATTRIBUTE_FID

public static final int SE_SHAPE_ATTRIBUTE_FID
Represents the feature id attribute of a shape.

See Also:
getShapeAttributeName(int), Constant Field Values

SE_LAYER_AUTO_REGISTER

public static final int SE_LAYER_AUTO_REGISTER
See Also:
Constant Field Values

SE_LAYER_HAS_USER_DEFINED_EXTENT

public static final int SE_LAYER_HAS_USER_DEFINED_EXTENT
See Also:
Constant Field Values

SE_LAYER_HAS_GEODETIC_EXTENT

public static final int SE_LAYER_HAS_GEODETIC_EXTENT
See Also:
Constant Field Values

SE_LAYER_PRECISION_DEFAULT

public static final int SE_LAYER_PRECISION_DEFAULT
See Also:
Constant Field Values

SE_LAYER_PRECISION_BASIC

public static final int SE_LAYER_PRECISION_BASIC
See Also:
Constant Field Values

SE_LAYER_PRECISION_HIGH

public static final int SE_LAYER_PRECISION_HIGH
See Also:
Constant Field Values

SE_LAYER_PRECISION_32_BIT

public static final int SE_LAYER_PRECISION_32_BIT
Deprecated. at ArcSDE v9.2, replaced by SE_LAYER_PRECISION_BASIC
See Also:
Constant Field Values

SE_LAYER_PRECISION_64_BIT

public static final int SE_LAYER_PRECISION_64_BIT
Deprecated. at ArcSDE v9.2, replaced by SE_LAYER_PRECISION_HIGH
See Also:
Constant Field Values
Constructor Detail

SeLayer

public SeLayer(SeConnection conn)
This constructor is used to create a new ArcSDE layer. After creating the SeLayer object you must also invoke the following methods to set the layer properties, before you can create the new layer:

setTableName(java.lang.String)

setSpatialColumnName(java.lang.String)

setShapeTypes(int)

setExtent(com.esri.sde.sdk.client.SeExtent)

setGridSizes(double, double, double)

setCreationKeyword(java.lang.String)

Parameters:
conn - Open SeConnection object.

SeLayer

public SeLayer(SeConnection conn,
               SeObjectId layerId)
        throws SeException
This SeLayer constructor is used to retrieve the properties of a layer from an ArcSDE server.

Parameters:
conn - SeConnection object handle.
layerId - the ArcSde layer ID.
Throws:
SeException

SeLayer

public SeLayer(SeConnection conn,
               java.lang.String table,
               java.lang.String spatCol)
        throws SeException
This SeLayer constructor is used to retrieve the properties of a layer from an ArcSDE server.

Parameters:
conn - SeConnection object handle.
table - the ArcSDE table name.
spatCol - the spatial column name.
Throws:
SeException,SeDoesNotExistException
SeException
Method Detail

alter

public void alter()
           throws SeException
Alters modifiable characteristics of a layer after creation. You can change the following characteristics:
- Shape types
- Layer description
- Grid sizes
- Coordinate system
- Load mode

You can alter a layer to allow the storage of annotations or CAD elements, but you can't remove them from the layer.

Throws:
SeException

create

public void create(int initialFeatures,
                   int avgPoints)
            throws SeException
Spatially enables an RDBMS table. Table name, spatial column name, shape types and grid sizes must be set for layer object before calling this function.

Parameters:
initialFeatures - A positive integer estimating the initial requirement for the number of features to store in this layer.Used for database allocation purposes.
avgPoints - The estimated average number of points per feature for this map layer.
Throws:
SeException

calculateExtent

public SeExtent calculateExtent(boolean useIndex,
                                SeSqlConstruct sqlC)
                         throws SeException
Calculates the extent (the minimum bounding box) of the features in a layer. If a where clause is specified, only those shapes satisfying the query are used to calculate the extent.

Parameters:
useIndex - Use the spatial index cells to compute an approximate extent if TRUE
sqlC - An optional SeSqlConstruct object that contains the where clause.
Returns:
SeExtent
Throws:
SeException

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Clones this SeLayer object.

Overrides:
clone in class java.lang.Object
Returns:
an SeLayer as type Object.
Throws:
java.lang.CloneNotSupportedException - if an error occurs

migrateStorage

public void migrateStorage(java.lang.String config_keyword)
                    throws SeException
Migrates a layer's geometry storage type from one type of storage to another based on the configuration keyword specified. Applies to Oracle databases only.

Supported migrations are:
-LONG RAW to BLOB (keyword = SDELOB)
-LONG RAW to ST_GEOMETRY
-BLOB to ST_GEOMETRY
-SDO_GEOMETRY to ST_GEOMETRY

Converting from LONG RAW to BLOB alters the geometry type in the Feature (F) table.

Converting from LONG RAW or BLOB to ST_GEOMETRY adds an ST_GEOMETRY spatial column to the business table, populates it from the existing F table, adds a domain index on the ST_GEOMETRY spatial column, and drops the existing F and S tables.

Converting from SDO_GEOMETRY to ST_GEOMETRY adds a spatial column of type ST_GEOMETRY to the business table, populates the ST_GEOMETRY column from the existing SDO_GEOMETRY column, creates a new domain index on the ST_GEOMETRY column, and drops the SDO_GEOMETRY column.

Notes

- It is strongly recommended to create a backup of data before geometry storage type migration. For example, this could be in the form of an sdeexport file.

- If the layer was registered as versioned, migrating it to a different geometry storage type will also update the shape column in the Adds table. If the layer has archiving enabled, the archive table's shape column will also be updated.

- Storage migration must be done by the user who owns the layer.

Parameters:
config_keyword - The DBTUNE configuration keyword specifying the new geometry storage to be used, either SDELOB (for BLOB storage) or ST_GEOMETRY
Throws:
SeException - if an error occurs

delete

public void delete()
            throws SeException
Deletes the spatial components from a spatially enabled table. This operation does the following:
- Deletes the layer record from the layers table.
- Deletes the feature and spatial index tables for the layer.
- Drops the trigger on the spatial column in the user's spatially enabled table.
- Sets the value of the spatial column to NULL for all rows in the spatially enabled table.

Throws:
SeException

getInfo

public void getInfo()
             throws SeException
Refreshes the properties of this SeLayer object by reading them from the ArcSDE server.

Throws:
SeException

getAccess

public int getAccess()
Retrieves the privilege bitmask for a layer. The value returned is an OR'ed bitmask of the following values:
SeDefs.SE_SELECT_PRIVILEGE
SeDefs.SE_UPDATE_PRIVILEGE
SeDefs.SE_INSERT_PRIVILEGE
SeDefs.SE_DELETE_PRIVILEGE


grantAccess

public void grantAccess(int privilege,
                        boolean grant,
                        java.lang.String user)
                 throws SeException
Grants specified privileges to the specified user. Current DBMS user must have sufficient DBMS privileges for grant to work. Multiple privileges can be set in a single call by ORing the privilege bitmasks. The access privileges that can be granted are:
SeDefs.SE_SELECT_PRIVILEGE
SeDefs.SE_UPDATE_PRIVILEGE
SeDefs.SE_INSERT_PRIVILEGE
SeDefs.SE_DELETE_PRIVILEGE

Parameters:
privilege - privilege to grant.
grant - granted user can/can't GRANT/REVOKE privilge.
user - DBMS user name to whom privilges need to be granted.
Throws:
SeException

revokeAccess

public void revokeAccess(int privilege,
                         java.lang.String user)
                  throws SeException
Revokes specified privileges from the specified user. Current DBMS user must have sufficient DBMS privileges for revoke to work. Multiple privileges can be set in a single call by ORing the privilege bitmasks.

Parameters:
privilege - privilege to grant.
user - DBMS user name to whom privilges need to be granted.
Throws:
SeException

lock

public void lock(int lockMode)
          throws SeException
Locks an ArcSde layer. Two types of layer locks can be set:
SE_WRITE_LOCK
SE_READ_LOCK
SE_WRITE_LOCK allows only the caller to modify the data. The layer can still be read by all other users. Only one SE_WRITE_LOCK lock at a time may exist on a layer. SE_READ_LOCK locks the layer against modifications. Multiple SE_READ_LOCK locks are possible on the same layer.

Parameters:
lockMode - lock type.
Throws:
SeException

getLocks

public SeLayer.SeLayerLock[] getLocks()
                               throws SeException
Returns a list of current locks.

Returns:
SeLayerLock[]
Throws:
SeException

lockArea

public void lockArea(int lockMode,
                     SeExtent envelope)
              throws SeException
Locks the specified area within ArcSde layer. Two types of layer locks can be set:
SE_WRITE_LOCK
SE_READ_LOCK
SE_READ_LOCK locks may overlap each other. SE_WRITE_LOCK locks may not overlap.

Parameters:
lockMode - lock type.
envelope - envelope defining the area to be locked.
Throws:
SeException

modifyLock

public void modifyLock(int lockMode,
                       SeExtent envelope)
                throws SeException
Modifies an existing lock on an area or the entire layer. It attempts to change the lock to 'new_lock_mode' and to make the lock area equal to the area specified. You can modify both the lock mode and the lock area. If area is NULL, the new lock is for the entire map layer. If an area is specified, the new lock is an area lock. If modifying the lock would result in an SE_LOCK_CONFLICT, the existing lock remains unchanged. If no lock currently exists, the function returns SE_NO_LOCKS without creating the new lock.

Parameters:
lockMode - lock type.
envelope - envelope defining the area to be locked.
Throws:
SeException

freeLock

public void freeLock()
              throws SeException
Frees the lock on an ArcSde layer.

Throws:
SeException

getSpatialIndexStats

public SeLayer.SeLayerSpatialIndexStats getSpatialIndexStats()
                                                      throws SeException
Returns statistical information about a layer's spatial indexes.

Returns:
SeLayerSpatialIndexStats
Throws:
SeException

getArraySize

public int getArraySize()
Retrieves the optimal array size for the specified layer.

Returns:
int

getStatsDate

public int getStatsDate()
Retrieves the stats date for the specified layer.

Returns:
int

getCoordRef

public SeCoordinateReference getCoordRef()
Retrieves the coordinate reference for the specified layer.

Returns:
SeCoordinateReference

getCreationDate

public java.util.Date getCreationDate()
Retrieves the layer creation date.

Returns:
java.util.Date

getCreationDateInMillis

public int getCreationDateInMillis()
Retrieves the layer creation date.

Returns:
java.util.Date

getCreationKeyword

public java.lang.String getCreationKeyword()
Retrieves the configuration keyword.

Returns:
String

getDescription

public java.lang.String getDescription()
Retrieves the layer's description.

Returns:
String

getExtent

public SeExtent getExtent()
Retrieves the layer's envelope.

Returns:
SeExtent

getGridSizes

public double[] getGridSizes()
Returns an array of layer's grid sizes. First element in the array is the first level grid size, second element is the second level grid size and the third element is the third level grid size.

Returns:
double[]
See Also:
setGridSizes(double, double, double)

getID

public SeObjectId getID()
Retrieves the layer ID.

Returns:
SeObjectId

getMinID

public SeObjectId getMinID()
Retrieves the minimum FID id.

Returns:
SeObjectId

getShapeTypes

public int getShapeTypes()
Retrieves the allowed shape types.

The allowable shape types are contained in a bit mask of the following values.
SE_NIL_TYPE_MASK
SE_POINT_TYPE_MASK
SE_LINE_TYPE_MASK
SE_SIMPLE_LINE_TYPE_MASK
SE_AREA_TYPE_MASK
SE_MULTIPART_TYPE_MASK

Returns:
int

isStorageExternal

public boolean isStorageExternal()
Returns TRUE if the layers storage type is external.

Returns:
boolean

isStorageNormalized

public boolean isStorageNormalized()
Returns TRUE if the layer's storage type is normalized.

Returns:
boolean

isStorageSdeBinary

public boolean isStorageSdeBinary()
Returns TRUE if the layer's storage type is sdebinary.

Returns:
boolean

isStorageSQL

public boolean isStorageSQL()
Returns TRUE if the layer's storage type is SQL or well-known text.

Returns:
boolean

isStorageWKB

public boolean isStorageWKB()
Returns TRUE if the layer's storage type is well-known binary.

Returns:
boolean

isStorageSpatial

public boolean isStorageSpatial()
Returns TRUE if the layer's storage type is spatial type.

Returns:
boolean

isStorageLOB

public boolean isStorageLOB()
Returns TRUE if the layer's storage type is LOB type.

Returns:
boolean

isPoint

public boolean isPoint()
Returns TRUE if the layer has point shapes.


isMultiPart

public boolean isMultiPart()
Returns TRUE if the layer has multipart enabled.


isLine

public boolean isLine()
Returns TRUE if the layer has line shapes.

Returns:
boolean

isPoly

public boolean isPoly()
Returns TRUE if the layer has polygon shapes.

Returns:
boolean

getTableName

public java.lang.String getTableName()
Returns the name of the table associated with the layer.

Returns:
String

getName

public java.lang.String getName()
Returns the name of the table associated with the layer.

Returns:
String

getQualifiedName

public java.lang.String getQualifiedName()
                                  throws SeException
Returns the layer's table name, qualified with the owner.

Returns:
String
Throws:
SeException

getSpatialColumn

public java.lang.String getSpatialColumn()
Retrieves the spatial column name of a layer.

Returns:
String

hasAnno

public boolean hasAnno()
Returns TRUE if a layer has annotation.

Returns:
boolean

hasCAD

public boolean hasCAD()
Returns TRUE if the layer allows CAD.

Returns:
boolean

hasSpatialIndex

public boolean hasSpatialIndex()
Returns TRUE if the layer has spatial index.

Returns:
boolean

isLoadOnly

public boolean isLoadOnly()
Returns TRUE if the layer is in load-only mode.

Returns:
boolean

isMeasured

public boolean isMeasured()
Returns TRUE if the layer allows measures.

Returns:
boolean

is3D

public boolean is3D()
Returns TRUE if the layer allows z-coordinates.

Returns:
boolean

setAnno

public void setAnno(boolean hasAnno)
Sets whether the layer allows anno.

Parameters:
hasAnno - Set to TRUE if the layer should allow annotations, otherwise set to FALSE.

setArraySize

public void setArraySize(int optArraySize)
Sets the optimal array size for the layer.

Parameters:
optArraySize - optimal array size.

setCAD

public void setCAD(boolean hasCAD)
Sets whether the layer allows CAD entities.

Parameters:
hasCAD - Set to TRUE if the layer should allow CAD data; otherwise, set to FALSE.

setCoordRef

public void setCoordRef(SeCoordinateReference coordref)
                 throws SeException
Sets the coordinate reference for the specified layer.

Parameters:
coordref - the coordinate reference for the layer.
Throws:
SeException

setSecondaryCoordRef

public void setSecondaryCoordRef(SeCoordinateReference coordref)
                          throws SeException
Sets the coordinate reference for the specified layer.

Parameters:
coordref - the coordinate reference for the layer.
Throws:
SeException

setCreationKeyword

public void setCreationKeyword(java.lang.String configKeyword)
Sets the configuration keyword. The ArcSDE dbtune table contains the list of valid configuration keywords and their definitions.

Parameters:
configKeyword - the layer config keyword.

setDescription

public void setDescription(java.lang.String description)
Sets the layer's description.

Parameters:
description - the layer description.

setExtent

public void setExtent(SeExtent envelope)
Sets the layer's envelope.

Parameters:
envelope - the layer extent.

setGridSizes

public void setGridSizes(double grid1,
                         double grid2,
                         double grid3)
                  throws SeException
Sets the spatial index grid sizes of the layer.

The type of spatial index that may be created for a particular layer is dependent on the DBMS in which the layer is stored and on the DBTUNE configuration keyword used to create the layer. Refer to the table below for the list of possible grid size settings that may be used for your DBMS.

DBMS Index Type Grid size 1 Grid Size 2 Grid size 3
DB2 Grid  <Grid size 1>  [Grid size 2] [Grid size 3]
Informix R Tree Ignored Ignored Ignored
Sqlserver Grid <Grid size 1> [Grid size 2] [Grid size 3]
Oracle (Binary) Grid <Grid size 1> [Grid size 2] [Grid size 3]
 Oracle (Spatial)  DBTUNE SE_SPATIALINDEX_DBTUNE SE_SPATIALINDEX_DBTUNE SE_SPATIALINDEX_DBTUNE
Oracle (Spatial) None SE_SPATIALINDEX_NONE Ignored Ignored
Oracle (Spatial) R Tree SE_SPATIALINDEX_RTREE Ignored Ignored
Oracle (Spatial)  Fixed Quadtree SE_SPATIALINDEX_FIXED_QUADTREE  <SDO_LEVEL>  Ignored
Oracle (Spatial)  Hybrid Quadtree   SE_SPATIALINDEX_HYBRID_QUADTREE  <SDO_LEVEL>  <SDO_NUMTILES> 

Grid index

The grid sizes are validated against the current coordinate reference. Grid sizes must be greater than 250 integer system units (converted with SE_COORDREF). Each successive grid size level must be at least three times larger than the previous level. You do not need to specify all of the grid sizes; omit the second or third grid size levels by specifying a size of 0.0. (For Oracle only, a value greater then 0 specifies that the spatial index will be a grid index.)

DBTUNE defined spatial index

For spatial columns created with a spatial layer SDO_GROMETRY column, setting all of the grid sizes to SE_SPATIALINDEX_DBTUNE specifies that the spatial index will be defined by DBTUNE storage parameters.

No spatial index

For spatial columns created with a Oracle spatial SDO_GEOMETRY data type, by setting the first grid size to SE_SPATIALINDEX_NONE , the layer is created without a spatial index.

Rtree spatial index

The Informix spatial index is always created as an RTREE index. All of the spatial index parameters are ignored. In fact this function is non-operable on a layer created in an Informix database.

The Rtree is also an option for a spatial column created with an Oracle Spatial SDO_GEOMETRY data type. In this case the first grid size must be set to SE_SPATIALINDEX_RTREE

Fixed Quadtree spatial index

For spatial columns created with an Oracle spatial SDO_GEOMETRY data type, by setting the first grid size to SE_SPATIALINDEX_FIXED_QUADTREE, the layer is create with a fixed quadtree spatial index.

Hybrid Quadtree spatial index

For spatial columns create with an Oracle spatial layer SDO_GEOMETRY data type, by setting the first grid size to SE_SPATIALINDEX_HYBRID_QUADTREE, the layer is created with a hybrid quadtree spatial index.

Parameters:
grid1 - The index type OR the first grid level size.
grid2 - Second grid level size.
grid3 - Third grid level size.
Throws:
SeException

setLoadMode

public void setLoadMode(boolean isLoadOnly)
Sets the layer to either load-only or normal I/O mode.

Parameters:
isLoadOnly - Set to TRUE if the layer should be in load-only mode, otherwise set to FALSE.

setMeasured

public void setMeasured(boolean isMeasured)
Updates whether the layer allows measures.

Parameters:
isMeasured - Set to TRUE if the layer should allow measures; otherwise set to FALSE.

setMinID

public void setMinID(SeObjectId minID)
              throws SeException
Sets the minimum fid value.

Parameters:
minID - The minimum FID value.
Throws:
SeException

setShapeTypes

public void setShapeTypes(int shapeTypes)
Sets shape types. The allowed shape types are:
SE_NIL_TYPE_MASK
SE_POINT_TYPE_MASK
SE_LINE_TYPE_MASK
SE_SIMPLE_LINE_TYPE_MASK
SE_AREA_TYPE_MASK
SE_MULTIPART_TYPE_MASK

Parameters:
shapeTypes - shape type mask.

setStorageTypes

public void setStorageTypes(int storageTypes)
Sets storage types. The storage_type arguments available are listed below. The list of storage types supported by each RDBMS is also listed.

Storage Types:
SE_STORAGE_SPATIAL_TYPE RDBMS`s spatial type storage.
SE_STORAGE_SDEBINARY_TYPE Standard ArcSDE storage format.
SE_STORAGE_LOB_TYPE Large Binary Object storage format.
SE_STORAGE_WKB_TYPE Well-known binary format(OBSOLETE).
SE_STORAGE_SQL_TYPE SQL or well-known text format(OBSOLETE).
SE_STORAGE_NORMALIZED_TYPE Normalized format (used for Spatial Data Option or Spatial Cartridge layers).

ORACLE:
SE_STORAGE_SDEBINARY_TYPE: Default storage type.
SE_STORAGE_SPATIAL_TYPE: ArcSDE 8.1 for Oracle8i only.
SE_STORAGE_LOB_TYPE: ArcSDE 8.1 onwards.
SE_STORAGE_NORMALIZED_TYPE
SE_STORAGE_WKB_TYPE (OBSOLETE).
SE_STORAGE_SQL_TYPE (OBSOLETE).

SQLSERVER:
SE_STORAGE_SDEBINARY_TYPE

DB2:
SE_STORAGE_SPATIAL_TYPE : ArcSDE 8.1 for DB2 Spatial Extender.
SE_STORAGE_SDEBINARY_TYPE : ArcSDE 3.0.2 server only.

INFORMIX:
SE_STORAGE_SPATIAL_TYPE : ArcSDE 8.1 for Informix with Spatial Datablade.
SE_STORAGE_SDEBINARY_TYPE : ArcSDE 3.0.2 server only.

Parameters:
storageTypes - storage type mask.

setSpatialColumnName

public void setSpatialColumnName(java.lang.String spatialColName)
Sets the spatial column name of the layer.

Parameters:
spatialColName - the spatial column name.

setTableName

public void setTableName(java.lang.String tableName)
                  throws SeException
Sets the business table containaing spatial column.

Parameters:
tableName - the table name.
Throws:
SeException

set3D

public void set3D(boolean is3D)
Updates whether the layer allows z-coordinates.

Parameters:
is3D - Set to TRUE if layer should allow z-coordinates.

truncate

public void truncate()
              throws SeException
Deletes the shapes of a spatially enabled table's spatial column. It does not remove the layer definition.

Throws:
SeException

getMinZ

public double getMinZ()
Returns the minimum elevation value.

Since:
9.0

getMinM

public double getMinM()
Returns the minimum measure value.

Since:
9.0

getMaxZ

public double getMaxZ()
Returns the maximum elevation value.

Since:
9.0

getMaxM

public double getMaxM()
Returns the maximum measure value.

Since:
9.0

setZRange

public void setZRange(double minZ,
                      double maxZ)
               throws SeException
Sets the Z (elevation) range for this Layer.

Parameters:
minZ - the minimum z value.
maxZ - the maximum z value.
Throws:
SeException - if unable to set the Z range.
Since:
9.0

setMRange

public void setMRange(double minM,
                      double maxM)
               throws SeException
Sets the M (measurement) range for this Layer.

Parameters:
minM - the minimum measure value.
maxM - the maximum measure value.
Throws:
SeException - if unable to set the M range.
Since:
9.0

hasSparseGrids

public boolean hasSparseGrids()
                       throws SeException
This routine returns true if the layer object is configured so that sparse grid indexes are generated for this layer.

Returns:
boolean
Throws:
SeException

setSparseGrids

public void setSparseGrids(boolean sparseGrids)
                    throws SeException
This routine configures the LAYERINFO object to allow or disallow the generation of sparse spatial index grids.

Parameters:
sparseGrids - boolean
Throws:
SeException

getShapeAttributeName

public java.lang.String getShapeAttributeName(int attrCode)
                                       throws SeException
Returns the column name for a specified shape attribute. The attr_code argument accepts the following values:
SE_SHAPE_ATTRIBUTE_NUMOFPTS
SE_SHAPE_ATTRIBUTE_ENTITY
SE_SHAPE_ATTRIBUTE_XMIN
SE_SHAPE_ATTRIBUTE_XMAX
SE_SHAPE_ATTRIBUTE_YMIN
SE_SHAPE_ATTRIBUTE_YMAX
SE_SHAPE_ATTRIBUTE_ZMIN
SE_SHAPE_ATTRIBUTE_ZMAX
SE_SHAPE_ATTRIBUTE_MMIN
SE_SHAPE_ATTRIBUTE_MMAX
SE_SHAPE_ATTRIBUTE_AREA
SE_SHAPE_ATTRIBUTE_LENGTH
SE_SHAPE_ATTRIBUTE_TEXT

Parameters:
attrCode - the macro code for the attribute.
Throws:
SeException