org.gcube.vremanagement.softwarerepository.db
Class ServiceScopeRelation

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

public class ServiceScopeRelation
extends java.lang.Object

Author:
Luca Frosini (ISTI-CNR)

Field Summary
static java.lang.String SCOPE_ID
          Scope ID field name
static java.lang.String SERVICE_ID
          Service ID field name
static java.lang.String TABLE_NAME
          TABLE_NAME
 
Constructor Summary
ServiceScopeRelation(java.lang.String serviceID, java.lang.Integer scopeID)
           
ServiceScopeRelation(java.lang.String serviceID, java.lang.Integer scopeID, SQLDBManager dbManager)
           
 
Method Summary
 void deleteRow()
           
 void insertRow()
          Insert this instance in DB if is a new row, no action is made otherwise
 
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

SERVICE_ID

public static final java.lang.String SERVICE_ID
Service ID field 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
Constructor Detail

ServiceScopeRelation

public ServiceScopeRelation(java.lang.String serviceID,
                            java.lang.Integer scopeID,
                            SQLDBManager dbManager)
                     throws java.lang.Exception
Parameters:
serviceID - Service ID
scopeID - Scope ID
dbManager - DB Manager instance. The connection will be open by the constructor itself
Throws:
java.lang.Exception - if constructor fails

ServiceScopeRelation

public ServiceScopeRelation(java.lang.String serviceID,
                            java.lang.Integer scopeID)
                     throws java.lang.Exception
Parameters:
serviceID - Service ID
scopeID - Scope ID
Throws:
java.lang.Exception - if constructor fails
Method Detail

insertRow

public void insertRow()
               throws java.sql.SQLException
Insert this instance in DB if is a new row, no action is made otherwise

Throws:
java.sql.SQLException - if INSERT fails

deleteRow

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