de.unikassel.android.sdcframework.persistence
Class DeleteSamplesCommand

Package class diagram package DeleteSamplesCommand
java.lang.Object
  extended by de.unikassel.android.sdcframework.persistence.AbstractDatabaseCommand<Long>
      extended by de.unikassel.android.sdcframework.persistence.DeleteSamplesCommand
All Implemented Interfaces:
DatabaseCommand<Long>

public class DeleteSamplesCommand
extends AbstractDatabaseCommand<Long>

Implementation of the sample deletion database command.


Field Summary
private  long count
          The record count to delete from database
private  boolean lowestPriorityFirst
          Flag, indicating if samples with lower priority shall be deleted first
 
Fields inherited from class de.unikassel.android.sdcframework.persistence.AbstractDatabaseCommand
DEFAULT_DB_OPEN_RETRY_COUNT
 
Constructor Summary
DeleteSamplesCommand(long count, boolean lowestPriorityFirst)
          Constructor
 
Method Summary
protected  Long applyCommand(DatabaseAdapter dbAdapter)
          Method to apply the basic database command operation.
 long getCount()
          Getter for the count of samples to delete
 boolean isLowestPriorityFirst()
          Getter for the lowestPriorityFirst flag
 
Methods inherited from class de.unikassel.android.sdcframework.persistence.AbstractDatabaseCommand
execute, getDbOpenRetryCount, getResult, internalExecute, isOpenReadOnly
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

count

private final long count
The record count to delete from database


lowestPriorityFirst

private final boolean lowestPriorityFirst
Flag, indicating if samples with lower priority shall be deleted first

Constructor Detail

DeleteSamplesCommand

public DeleteSamplesCommand(long count,
                            boolean lowestPriorityFirst)
Constructor

Parameters:
count - the record count to delete from database
lowestPriorityFirst - flag if samples with lower priority shall be deleted first
Method Detail

getCount

public final long getCount()
Getter for the count of samples to delete

Returns:
the count of samples to delete

isLowestPriorityFirst

public final boolean isLowestPriorityFirst()
Getter for the lowestPriorityFirst flag

Returns:
the lowestPriorityFirst flag

applyCommand

protected final Long applyCommand(DatabaseAdapter dbAdapter)
Description copied from class: AbstractDatabaseCommand
Method to apply the basic database command operation.

Specified by:
applyCommand in class AbstractDatabaseCommand<Long>
Parameters:
dbAdapter - the database adapter to use
Returns:
the command result