org.alfresco.bm.data
Class ProcessData

java.lang.Object
  extended by org.alfresco.bm.data.ProcessData
All Implemented Interfaces:
Serializable

public class ProcessData
extends Object
implements Serializable

Sample POJO for demonstration. This file should be deleted.

Since:
1.0
Author:
Derek Hulley
See Also:
Serialized Form

Field Summary
static String FIELD_DONE
           
static String FIELD_ID
           
static String FIELD_PROCESS_NAME
           
 
Constructor Summary
ProcessData()
           
 
Method Summary
static void checkIndexes(org.springframework.data.mongodb.core.MongoTemplate mongo, String collectionName)
          Ensure that the MongoDB collection has the required indexes associated with this user bean.
static ProcessData findProcessByName(org.springframework.data.mongodb.core.MongoTemplate mongo, String collectionName, String processName)
          Utility method to find a user by process name
 String getId()
           
 String getProcessName()
           
 boolean isDone()
           
static int markAsDone(org.springframework.data.mongodb.core.MongoTemplate mongo, String collectionName, String processName)
          Utility method to find a user by process name
 void setDone(boolean done)
           
 void setId(String id)
           
 void setProcessName(String processName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FIELD_ID

public static final String FIELD_ID
See Also:
Constant Field Values

FIELD_PROCESS_NAME

public static final String FIELD_PROCESS_NAME
See Also:
Constant Field Values

FIELD_DONE

public static final String FIELD_DONE
See Also:
Constant Field Values
Constructor Detail

ProcessData

public ProcessData()
Method Detail

checkIndexes

public static void checkIndexes(org.springframework.data.mongodb.core.MongoTemplate mongo,
                                String collectionName)
Ensure that the MongoDB collection has the required indexes associated with this user bean.

Parameters:
mongo - connection to MongoDB
collectionName - name of DB collection containing data

findProcessByName

public static ProcessData findProcessByName(org.springframework.data.mongodb.core.MongoTemplate mongo,
                                            String collectionName,
                                            String processName)
Utility method to find a user by process name

Parameters:
mongo - connection to MongoDB
collectionName - name of DB collection containing data
processName - the name of the process to find
Returns:
Returns the data or null if not found

markAsDone

public static int markAsDone(org.springframework.data.mongodb.core.MongoTemplate mongo,
                             String collectionName,
                             String processName)
Utility method to find a user by process name

Parameters:
mongo - connection to MongoDB
collectionName - name of DB collection containing data
processName - the name of the process to update
Returns:
the number of rows updated

getId

public String getId()

setId

public void setId(String id)

getProcessName

public String getProcessName()

setProcessName

public void setProcessName(String processName)

isDone

public boolean isDone()

setDone

public void setDone(boolean done)


Copyright © 2012. All Rights Reserved.