org.gcube.vremanagement.softwarerepository.db
Class Scope

java.lang.Object
  extended by org.gcube.vremanagement.softwarerepository.db.Scope

public class Scope
extends java.lang.Object

Author:
Luca Frosini (ISTI-CNR)

Field Summary
static java.lang.String NAME
          Scope Name field name
static java.lang.String SCOPE_ID
          Scope ID field name
static java.lang.String TABLE_NAME
          Table Name
 
Constructor Summary
Scope(java.lang.String name)
          Create new Scope instance with name
Scope(java.lang.String name, SQLDBManager dbManager)
          Create new Scope instance with name
 
Method Summary
 void deleteRow()
           
 java.lang.Integer getScopeID()
           
 void insertRow()
          Insert this instance in DB
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TABLE_NAME

public static final java.lang.String TABLE_NAME
Table Name

See Also:
Constant Field Values

SCOPE_ID

public static final java.lang.String SCOPE_ID
Scope ID field name

See Also:
Constant Field Values

NAME

public static final java.lang.String NAME
Scope Name field name

See Also:
Constant Field Values
Constructor Detail

Scope

public Scope(java.lang.String name,
             SQLDBManager dbManager)
      throws java.lang.Exception
Create new Scope instance with name

Parameters:
name - scope name
dbManager - DB Manager instance. The connection will be open by the constructor itself
Throws:
java.lang.Exception - if the scope

Scope

public Scope(java.lang.String name)
      throws java.lang.Exception
Create new Scope instance with name

Parameters:
name - scope name
Throws:
java.lang.Exception - if the scope
Method Detail

getScopeID

public java.lang.Integer getScopeID()
                             throws java.lang.Exception
Returns:
scopeID
Throws:
java.lang.Exception - if the record is not yet on db

insertRow

public void insertRow()
               throws java.sql.SQLException,
                      java.lang.Exception
Insert this instance in DB

Throws:
java.sql.SQLException - if INSERT fails
java.lang.Exception - if Scope Id retrieving from db fails

deleteRow

public void deleteRow()
               throws java.sql.SQLException
Throws:
java.sql.SQLException - if DELETE fails