com.perforce.p4java.impl.generic.admin
Class DbSchema

java.lang.Object
  extended by com.perforce.p4java.impl.generic.admin.DbSchema
All Implemented Interfaces:
IDbSchema

public class DbSchema
extends Object
implements IDbSchema

Simple default implementation class for the IDbSchema interface.


Field Summary
 
Fields inherited from interface com.perforce.p4java.admin.IDbSchema
NOVERSION
 
Constructor Summary
DbSchema()
          Default constructor.
DbSchema(Map<String,Object> map)
          Construct a DbSchema from a map returned by the Perforce server.
DbSchema(String name, int version, List<Map<String,String>> columnMetadata)
          Construct a DbSchema using explicit field values.
 
Method Summary
 List<Map<String,String>> getColumnMetadata()
          Get a list of column metadata maps.
 String getName()
          Get the name of the table.
 int getVersion()
          Get the table schema version.
 void setColumnMetadata(List<Map<String,String>> columnMetadata)
          Set the colum metadata map.
 void setName(String name)
          Set the name of the table.
 void setVersion(int version)
          Get the table schema version.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DbSchema

public DbSchema()
Default constructor.


DbSchema

public DbSchema(String name,
                int version,
                List<Map<String,String>> columnMetadata)
Construct a DbSchema using explicit field values.


DbSchema

public DbSchema(Map<String,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.

Method Detail

getColumnMetadata

public List<Map<String,String>> getColumnMetadata()
Description copied from interface: IDbSchema
Get 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.

Specified by:
getColumnMetadata in interface IDbSchema
See Also:
IDbSchema.getColumnMetadata()

getName

public String getName()
Description copied from interface: IDbSchema
Get the name of the table.

Specified by:
getName in interface IDbSchema
See Also:
IDbSchema.getName()

getVersion

public int getVersion()
Description copied from interface: IDbSchema
Get the table schema version.

Specified by:
getVersion in interface IDbSchema
See Also:
IDbSchema.getVersion()

setName

public void setName(String name)
Description copied from interface: IDbSchema
Set the name of the table.

Specified by:
setName in interface IDbSchema

setVersion

public void setVersion(int version)
Description copied from interface: IDbSchema
Get the table schema version.

Specified by:
setVersion in interface IDbSchema

setColumnMetadata

public void setColumnMetadata(List<Map<String,String>> columnMetadata)
Description copied from interface: IDbSchema
Set the colum metadata map.

Specified by:
setColumnMetadata in interface IDbSchema


Copyright © 2015 Perforce Software. All Rights Reserved.