Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.drupal.project.async_command
Class CommandRecord

    java.lang.Object
      org.drupal.project.async_command.CommandRecord

All Implemented Interfaces:
  java.lang.Comparable<CommandRecord>

    public class CommandRecord

extends java.lang.Object
implements java.lang.Comparable<CommandRecord>

Database record for this AsyncCommand. Being inner class means this class and the outer class can share access to private members.

Constructor Summary
`CommandRecord(java.util.Map<java.lang.String,java.lang.Object> row, DrupalConnection drupalConnection)` Given the database query result, construct a AsyncCommand Record object.

Method Summary
`int` | `compareTo(CommandRecord o)` The smaller the weight, created, or id, the smaller the record.
`static CommandRecord` | `createAdHocRecord(java.util.Map<java.lang.String,java.lang.Object> fields)`
`static CommandRecord` | `createDbRecord(java.util.Map<java.lang.String,java.lang.Object> fields, DrupalConnection drupalConnection)` Not supported yet!! Create a record and save in the database.
`java.lang.String` | `getApp()`
`java.lang.Long` | `getCheckpoint()`
`java.lang.String` | `getCommand()`
`java.lang.String` | `getControl()`
`java.lang.Long` | `getCreated()`
`java.lang.Long` | `getDependency()`
`java.lang.String` | `getDescription()`
`java.lang.Long` | `getEid()`
`java.lang.Long` | `getEnd()`
`java.lang.Long` | `getId()`
`java.lang.Long` | `getId1()`
`java.lang.Long` | `getId2()`
`byte[]` | `getInput()`
`java.lang.String` | `getMessage()`
`java.lang.Float` | `getNumber1()`
`java.lang.Float` | `getNumber2()`
`java.lang.Float` | `getNumber3()`
`java.lang.Float` | `getNumber4()`
`byte[]` | `getOutput()`
`java.lang.Float` | `getProgress()`
`java.lang.Long` | `getStart()`
`AsyncCommand.Status` | `getStatus()`
`java.lang.String` | `getString1()`
`java.lang.String` | `getString2()`
`java.lang.Long` | `getUid()`
`java.lang.Long` | `getWeight()`
`void` | `persistField(java.lang.String fieldName, java.lang.Object fieldValue)` Update a single field in the {async_command} table.
`void` | `persistResult()` Update the result and status part of the command record.
`void` | `setCheckpoint(java.lang.Long checkpoint)`
`void` | `setControl(java.lang.String control)`
`void` | `setEnd(java.lang.Long end)`
`void` | `setId1(java.lang.Long id1)`
`void` | `setId2(java.lang.Long id2)`
`void` | `setMessage(java.lang.String message)`
`void` | `setNumber1(java.lang.Float number1)`
`void` | `setNumber2(java.lang.Float number2)`
`void` | `setNumber3(java.lang.Float number3)`
`void` | `setNumber4(java.lang.Float number4)`
`void` | `setOutput(byte[] output)`
`void` | `setProgress(java.lang.Float progress)`
`void` | `setStart(java.lang.Long start)`
`void` | `setStatus(AsyncCommand.Status status)`
`void` | `setStatus(java.lang.String status)`
`void` | `setString1(java.lang.String string1)`
`void` | `setString2(java.lang.String string2)`
`void` | `setWeight(java.lang.Long weight)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CommandRecord

    public CommandRecord(java.util.Map<java.lang.String,java.lang.Object> row,
                         DrupalConnection drupalConnection)

  Given the database query result, construct a AsyncCommand Record object.

  Parameters:
    `row` - Database row for this record, should exact match the record.
    `drupalConnection` -

Method Detail

### persistResult

    public void persistResult()

  Update the result and status part of the command record.

### persistField

    public void persistField(java.lang.String fieldName,
                             java.lang.Object fieldValue)

  Update a single field in the {async_command} table.

  Parameters:
    `fieldName` - Can only be status, control, message, weight, start, end, checkpoint and progress.
    `fieldValue` - The value of the field. Doesn't have to match to the class member field.

### compareTo

    public int compareTo(CommandRecord o)

  The smaller the weight, created, or id, the smaller the record. Smaller record would get executed first.

  Specified by:
    `compareTo` in interface `java.lang.Comparable<CommandRecord>`
  Parameters:
    `o` -
  Returns:

### createDbRecord

    public static CommandRecord createDbRecord(java.util.Map<java.lang.String,java.lang.Object> fields,
                                               DrupalConnection drupalConnection)

  Not supported yet!! Create a record and save in the database.

  Parameters:
    `fields` -
    `drupalConnection` -
  Returns:

### createAdHocRecord

    public static CommandRecord createAdHocRecord(java.util.Map<java.lang.String,java.lang.Object> fields)

### getCommand

    public java.lang.String getCommand()

### setStatus

    public void setStatus(AsyncCommand.Status status)

### getStatus

    public AsyncCommand.Status getStatus()

### getId

    public java.lang.Long getId()

### getApp

    public java.lang.String getApp()

### getDescription

    public java.lang.String getDescription()

### getUid

    public java.lang.Long getUid()

### getEid

    public java.lang.Long getEid()

### getCreated

    public java.lang.Long getCreated()

### getInput

    public byte[] getInput()

### getOutput

    public byte[] getOutput()

### getId1

    public java.lang.Long getId1()

### getId2

    public java.lang.Long getId2()

### getNumber1

    public java.lang.Float getNumber1()

### getNumber2

    public java.lang.Float getNumber2()

### getNumber3

    public java.lang.Float getNumber3()

### getNumber4

    public java.lang.Float getNumber4()

### getString1

    public java.lang.String getString1()

### getString2

    public java.lang.String getString2()

### getControl

    public java.lang.String getControl()

### getMessage

    public java.lang.String getMessage()

### getWeight

    public java.lang.Long getWeight()

### getDependency

    public java.lang.Long getDependency()

### getStart

    public java.lang.Long getStart()

### getEnd

    public java.lang.Long getEnd()

### getCheckpoint

    public java.lang.Long getCheckpoint()

### getProgress

    public java.lang.Float getProgress()

### setOutput

    public void setOutput(byte[] output)

### setId1

    public void setId1(java.lang.Long id1)

### setId2

    public void setId2(java.lang.Long id2)

### setNumber1

    public void setNumber1(java.lang.Float number1)

### setNumber2

    public void setNumber2(java.lang.Float number2)

### setNumber3

    public void setNumber3(java.lang.Float number3)

### setNumber4

    public void setNumber4(java.lang.Float number4)

### setString1

    public void setString1(java.lang.String string1)

### setString2

    public void setString2(java.lang.String string2)

### setStatus

    public void setStatus(java.lang.String status)

### setControl

    public void setControl(java.lang.String control)

### setMessage

    public void setMessage(java.lang.String message)

### setWeight

    public void setWeight(java.lang.Long weight)

### setStart

    public void setStart(java.lang.Long start)

### setEnd

    public void setEnd(java.lang.Long end)

### setCheckpoint

    public void setCheckpoint(java.lang.Long checkpoint)

### setProgress

    public void setProgress(java.lang.Float progress)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD