org.gcube.contentmanagement.timeseriesservice.impl.editing
Class Edit

java.lang.Object
  extended by org.gcube.contentmanagement.timeseriesservice.impl.editing.EditProxy
      extended by org.gcube.contentmanagement.timeseriesservice.impl.editing.Edit
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ColumnEditor, DimensionEditor, RuleEditor

public abstract class Edit
extends EditProxy
implements Serializable

See Also:
Serialized Form

Nested Class Summary
static class Edit.TYPE
           
 
Field Summary
protected  String COUNT_ALIAS
           
protected  String CURATION_TABLE_ALIAS
           
protected  String DIMENSION_TABLE_ALIAS
           
protected  Edit.TYPE editorType
           
protected  String fieldId
           
protected  int[] fieldlength
           
protected  LinkedList<CurationHistoryItem> historyEditorList
           
protected  org.gcube.common.dbinterface.ColumnDefinition[] internalColumndefinition
           
protected  org.gcube.contentmanagement.timeseriesservice.stubs.types.Status isUnderInitialization
           
protected  String resourceId
           
protected  org.gcube.common.dbinterface.tables.SimpleTable resourceTable
           
protected  String ROW_ID_LABEL
           
protected  boolean withoutErrors
           
 
Constructor Summary
Edit(String resourceId, String fieldId, org.gcube.common.dbinterface.tables.SimpleTable resourceTable, int[] fieldlength, boolean withoutError, String... rowIdLabel)
           
 
Method Summary
abstract  long check()
           
 void dismiss()
          exits from edit mode and removes all the temporary tables
 long errorCount()
          return the number of errors for this column setting
protected  org.gcube.common.dbinterface.tables.SimpleTable getCorrectsTable()
           
protected  String getCorrectsTableName()
           
 Edit.TYPE getEditorType()
           
 String getFieldId()
           
 int[] getFieldLength()
           
 LinkedList<CurationHistoryItem> getHistoryItems()
           
 org.gcube.contentmanagement.timeseriesservice.stubs.types.Status getIsUnderInitialization()
          set the Status for the edit initialization
 String getResultAsJson(org.gcube.common.dbinterface.queries.Select query, boolean onlyErrors)
          allows user to retrieve all the information in the table as JSon
protected  org.gcube.common.dbinterface.tables.SimpleTable getWrongsTable()
           
protected  String getWrongsTableName()
           
 void initialize()
           
protected abstract  void internalInitialize(org.gcube.common.dbinterface.pool.DBSession session)
           
 int removeAllErrors()
           
 int removeSingleError(long rowId)
           
 void save()
          saves the current set
 void setHistoryItems(LinkedList<CurationHistoryItem> historyEditorList)
           
 void setIsUnderInitialization(org.gcube.contentmanagement.timeseriesservice.stubs.types.Status isUnderInitialization)
          sets the initialization Status
 void setIsUnderInitialization(String isUnderInitialization)
           
 long totalCount()
          the total entries count
 
Methods inherited from class org.gcube.contentmanagement.timeseriesservice.impl.editing.EditProxy
getDistinctErrors, getPossibleValues, getTemporaryColumnDefinition, modifyDistinctEntryId, modifyDistinctEntryValue, modifyEntryId, replaceDistinctIds, replaceDistinctValue, replaceEntryValueWithId, replaceIds, replaceValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

editorType

protected Edit.TYPE editorType

ROW_ID_LABEL

protected String ROW_ID_LABEL

CURATION_TABLE_ALIAS

protected final String CURATION_TABLE_ALIAS
See Also:
Constant Field Values

DIMENSION_TABLE_ALIAS

protected final String DIMENSION_TABLE_ALIAS
See Also:
Constant Field Values

COUNT_ALIAS

protected final String COUNT_ALIAS
See Also:
Constant Field Values

fieldId

protected String fieldId

withoutErrors

protected boolean withoutErrors

resourceId

protected String resourceId

fieldlength

protected int[] fieldlength

isUnderInitialization

protected org.gcube.contentmanagement.timeseriesservice.stubs.types.Status isUnderInitialization

resourceTable

protected org.gcube.common.dbinterface.tables.SimpleTable resourceTable

internalColumndefinition

protected org.gcube.common.dbinterface.ColumnDefinition[] internalColumndefinition

historyEditorList

protected LinkedList<CurationHistoryItem> historyEditorList
Constructor Detail

Edit

public Edit(String resourceId,
            String fieldId,
            org.gcube.common.dbinterface.tables.SimpleTable resourceTable,
            int[] fieldlength,
            boolean withoutError,
            String... rowIdLabel)
Method Detail

getFieldId

public String getFieldId()
Returns:
the fieldId

getEditorType

public Edit.TYPE getEditorType()
Returns:
the editorType

getFieldLength

public int[] getFieldLength()
Returns:
the fieldlength

getCorrectsTable

protected org.gcube.common.dbinterface.tables.SimpleTable getCorrectsTable()

getWrongsTable

protected org.gcube.common.dbinterface.tables.SimpleTable getWrongsTable()

initialize

public void initialize()

internalInitialize

protected abstract void internalInitialize(org.gcube.common.dbinterface.pool.DBSession session)
                                    throws Exception
Throws:
Exception

check

public abstract long check()
                    throws Exception
Throws:
Exception

save

public void save()
          throws Exception
saves the current set

Throws:
Exception - -

getResultAsJson

public String getResultAsJson(org.gcube.common.dbinterface.queries.Select query,
                              boolean onlyErrors)
                       throws OperationNotSupportedException,
                              Exception
allows user to retrieve all the information in the table as JSon

Parameters:
limit - the query limit
onlyErrors - if true the method returns only the wrong entries
Returns:
a JSon string
Throws:
Exception - -
OperationNotSupportedException

errorCount

public long errorCount()
                throws Exception
return the number of errors for this column setting

Returns:
the error count
Throws:
Exception

totalCount

public long totalCount()
                throws Exception
the total entries count

Returns:
the total entries count
Throws:
Exception

dismiss

public void dismiss()
exits from edit mode and removes all the temporary tables


getIsUnderInitialization

public org.gcube.contentmanagement.timeseriesservice.stubs.types.Status getIsUnderInitialization()
set the Status for the edit initialization

Returns:
the Status

setIsUnderInitialization

public void setIsUnderInitialization(org.gcube.contentmanagement.timeseriesservice.stubs.types.Status isUnderInitialization)
sets the initialization Status

Parameters:
isUnderInitialization - the Status

setIsUnderInitialization

public void setIsUnderInitialization(String isUnderInitialization)
Parameters:
isUnderInitialization - Status as string

getHistoryItems

public LinkedList<CurationHistoryItem> getHistoryItems()
Specified by:
getHistoryItems in class EditProxy
Returns:

setHistoryItems

public void setHistoryItems(LinkedList<CurationHistoryItem> historyEditorList)
Parameters:
historyEditorList -

removeAllErrors

public int removeAllErrors()
                    throws Exception
Returns:
the remained lines
Throws:
Exception

removeSingleError

public int removeSingleError(long rowId)
                      throws Exception
Throws:
Exception

getCorrectsTableName

protected String getCorrectsTableName()

getWrongsTableName

protected String getWrongsTableName()


Copyright © 2012. All Rights Reserved.