Class DbSchema
- java.lang.Object
-
- com.perforce.p4java.impl.generic.admin.DbSchema
-
-
Constructor Summary
Constructors Constructor Description DbSchema()Default constructor.DbSchema(java.lang.String name, int version, java.util.List<java.util.Map<java.lang.String,java.lang.String>> columnMetadata)Construct a DbSchema using explicit field values.DbSchema(java.util.Map<java.lang.String,java.lang.Object> map)Construct a DbSchema from a map returned by the Perforce server.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.util.Map<java.lang.String,java.lang.String>>getColumnMetadata()java.lang.StringgetName()intgetVersion()voidsetColumnMetadata(java.util.List<java.util.Map<java.lang.String,java.lang.String>> columnMetadata)Set the colum metadata map.voidsetName(java.lang.String name)Set the name of the table.voidsetVersion(int version)Set the table schema version.
-
-
-
Constructor Detail
-
DbSchema
public DbSchema()
Default constructor.
-
DbSchema
public DbSchema(java.lang.String name, int version, java.util.List<java.util.Map<java.lang.String,java.lang.String>> columnMetadata)Construct a DbSchema using explicit field values.- Parameters:
name- nameversion- versioncolumnMetadata- columnMetadata
-
DbSchema
public DbSchema(java.util.Map<java.lang.String,java.lang.Object> map)
Construct a DbSchema from a map returned by the Perforce server.Don't use this unless you know the correct format of the maps and you either got the map directly from the server or you cobbled together something suitable yourself. No real error- or sanity-checking is done here.
- Parameters:
map- map data
-
-
Method Detail
-
getColumnMetadata
public java.util.List<java.util.Map<java.lang.String,java.lang.String>> getColumnMetadata()
- Specified by:
getColumnMetadatain interfaceIDbSchema- Returns:
- a list of column metadata maps. Note that while this list should never be null, individual map values within it may be null. Field (map key) names and values are not explained here.
- See Also:
IDbSchema.getColumnMetadata()
-
getName
public java.lang.String getName()
- Specified by:
getNamein interfaceIDbSchema- Returns:
- the name of the table.
- See Also:
IDbSchema.getName()
-
getVersion
public int getVersion()
- Specified by:
getVersionin interfaceIDbSchema- Returns:
- the table schema version.
- See Also:
IDbSchema.getVersion()
-
setName
public void setName(java.lang.String name)
Description copied from interface:IDbSchemaSet the name of the table.
-
setVersion
public void setVersion(int version)
Description copied from interface:IDbSchemaSet the table schema version.- Specified by:
setVersionin interfaceIDbSchema- Parameters:
version- schema version
-
setColumnMetadata
public void setColumnMetadata(java.util.List<java.util.Map<java.lang.String,java.lang.String>> columnMetadata)
Description copied from interface:IDbSchemaSet the colum metadata map.- Specified by:
setColumnMetadatain interfaceIDbSchema- Parameters:
columnMetadata- data
-
-