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:
java.io.Serializable
Direct Known Subclasses:
ColumnEditor, DimensionEditor, RuleEditor

public abstract class Edit
extends EditProxy
implements java.io.Serializable

See Also:
Serialized Form

Nested Class Summary
static class Edit.TYPE
           
 
Constructor Summary
Edit(java.lang.String resourceId, java.lang.String fieldId, SimpleTable resourceTable, int[] fieldlength, boolean withoutError, java.lang.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
 Edit.TYPE getEditorType()
           
 java.lang.String getFieldId()
           
 int[] getFieldLength()
           
 java.util.LinkedList<CurationHistoryItem> getHistoryItems()
           
 State getIsUnderInitialization()
          set the state for the edit initialization
 java.lang.String getResultAsJson(Select query, boolean onlyErrors)
          allows user to retrieve all the information in the table as JSon
 void initialize()
           
 int removeAllErrors()
           
 int removeSingleError(long rowId)
           
 void save()
          saves the current set
 void setHistoryItems(java.util.LinkedList<CurationHistoryItem> historyEditorList)
           
 void setIsUnderInitialization(State isUnderInitialization)
          sets the initialization state
 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
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Edit

public Edit(java.lang.String resourceId,
            java.lang.String fieldId,
            SimpleTable resourceTable,
            int[] fieldlength,
            boolean withoutError,
            java.lang.String... rowIdLabel)
Method Detail

getFieldId

public java.lang.String getFieldId()
Returns:
the fieldId

getEditorType

public Edit.TYPE getEditorType()
Returns:
the editorType

getFieldLength

public int[] getFieldLength()
Returns:
the fieldlength

initialize

public void initialize()

check

public abstract long check()
                    throws java.lang.Exception
Throws:
java.lang.Exception

save

public void save()
          throws java.lang.Exception
saves the current set

Throws:
java.lang.Exception - -

getResultAsJson

public java.lang.String getResultAsJson(Select query,
                                        boolean onlyErrors)
                                 throws OperationNotSupportedException,
                                        java.lang.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:
java.lang.Exception - -
OperationNotSupportedException

errorCount

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

Returns:
the error count
Throws:
java.lang.Exception

totalCount

public long totalCount()
                throws java.lang.Exception
the total entries count

Returns:
the total entries count
Throws:
java.lang.Exception

dismiss

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


getIsUnderInitialization

public State getIsUnderInitialization()
set the state for the edit initialization

Returns:
the state

setIsUnderInitialization

public void setIsUnderInitialization(State isUnderInitialization)
sets the initialization state

Parameters:
isUnderInitialization - the State

getHistoryItems

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

setHistoryItems

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

removeAllErrors

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

removeSingleError

public int removeSingleError(long rowId)
                      throws java.lang.Exception
Throws:
java.lang.Exception