Class DbSchema

  • All Implemented Interfaces:
    IDbSchema

    public class DbSchema
    extends java.lang.Object
    implements IDbSchema
    Simple default implementation class for the IDbSchema interface.
    • 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.String getName()  
      int getVersion()  
      void setColumnMetadata​(java.util.List<java.util.Map<java.lang.String,​java.lang.String>> columnMetadata)
      Set the colum metadata map.
      void setName​(java.lang.String name)
      Set the name of the table.
      void setVersion​(int version)
      Set 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​(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 - name
        version - version
        columnMetadata - 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:
        getColumnMetadata in interface IDbSchema
        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()
      • setName

        public void setName​(java.lang.String name)
        Description copied from interface: IDbSchema
        Set the name of the table.
        Specified by:
        setName in interface IDbSchema
        Parameters:
        name - table name
      • setVersion

        public void setVersion​(int version)
        Description copied from interface: IDbSchema
        Set the table schema version.
        Specified by:
        setVersion in interface IDbSchema
        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: IDbSchema
        Set the colum metadata map.
        Specified by:
        setColumnMetadata in interface IDbSchema
        Parameters:
        columnMetadata - data