BrightSide Workbench Full Report + Source Code
org.turro.erp.sales.logic.CustomerOrderWrapper Class Reference
Inheritance diagram for org.turro.erp.sales.logic.CustomerOrderWrapper:
Collaboration diagram for org.turro.erp.sales.logic.CustomerOrderWrapper:

Public Member Functions

 CustomerOrderWrapper (CustomerOrder entity)
 
void delete (final boolean close)
 
boolean canDelete ()
 
- Public Member Functions inherited from org.turro.erp.workorder.CustomerOrderWrapper
CustomerOrder save ()
 
- Public Member Functions inherited from org.turro.jpa.entity.DaoEntity< T extends IDaoEntity, ID extends Serializable >
 DaoEntity ()
 
 DaoEntity (Class< T > persistentClass)
 
 DaoEntity (T entity)
 
Dao getDao ()
 
getEntity ()
 
IElephantEntity getIee ()
 
find (ID id)
 
boolean delete ()
 
ID getId ()
 
List< String > getMessages ()
 
boolean canSave ()
 
boolean equals (Object obj)
 
int hashCode ()
 

Protected Member Functions

void logEntity (LogType logType, String path, String action, String data)
 
- Protected Member Functions inherited from org.turro.erp.workorder.CustomerOrderWrapper
Dao createDao ()
 
boolean shouldLog ()
 
- Protected Member Functions inherited from org.turro.jpa.entity.DaoEntity< T extends IDaoEntity, ID extends Serializable >
void logEntity (SystemLogType logType, Object entity, String action, String data)
 
String dataEntity (Object entity)
 
void initOperation ()
 
void addMessage (String message)
 

Additional Inherited Members

- Static Public Member Functions inherited from org.turro.erp.workorder.CustomerOrderWrapper
static Collection< CustomerOrdergetLines (CustomerOrder customerOrder)
 
- Static Public Member Functions inherited from org.turro.jpa.entity.DaoEntity< T extends IDaoEntity, ID extends Serializable >
static Object getEntityId (Object entity)
 
static boolean isNewId (Object id)
 
- Protected Attributes inherited from org.turro.jpa.entity.DaoEntity< T extends IDaoEntity, ID extends Serializable >
entity
 
ID id
 
List< String > messages = new ArrayList<>()
 

Detailed Description

Constructor & Destructor Documentation

◆ CustomerOrderWrapper()

org.turro.erp.sales.logic.CustomerOrderWrapper.CustomerOrderWrapper ( CustomerOrder  entity)

Member Function Documentation

◆ canDelete()

boolean org.turro.erp.sales.logic.CustomerOrderWrapper.canDelete ( )

Reimplemented from org.turro.jpa.entity.DaoEntity< T extends IDaoEntity, ID extends Serializable >.

Definition at line 55 of file bserp-www/src/main/java/org/turro/erp/sales/logic/CustomerOrderWrapper.java.

55  {
56  if(entity.getId() == 0) return false;
57 // Dao dao = getDao();
58 // Long count = (Long) dao.getSingleResult(
59 // "select count(*) from Document " +
60 // "where contract = ?",
61 // new Object[] { contract });
62 // if(count == 0) {
63 // count = (Long) dao.getSingleResult(
64 // "select count(*) from DocumentLine " +
65 // "where store = ?",
66 // new Object[] { contract });
67 // }
68 // return count == 0;
69  return true;
70  }
Here is the caller graph for this function:

◆ delete()

void org.turro.erp.sales.logic.CustomerOrderWrapper.delete ( final boolean  close)

Definition at line 39 of file bserp-www/src/main/java/org/turro/erp/sales/logic/CustomerOrderWrapper.java.

39  {
40  // Check if possible and notify
41  if(canDelete()) {
42  ZkossUtils.confirmDeletion(null, new Command() {
43  @Override
44  public Object execute(Context context) {
45  if(CustomerOrderWrapper.super.delete()) {
46  if(close) Framework.getCurrent().closeSelected();
47  }
48  return null;
49  }
50  });
51  }
52  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ logEntity()

void org.turro.erp.sales.logic.CustomerOrderWrapper.logEntity ( LogType  logType,
String  path,
String  action,
String  data 
)
protected

Definition at line 73 of file bserp-www/src/main/java/org/turro/erp/sales/logic/CustomerOrderWrapper.java.

73  {
74  Authentication.log(logType, path, action, data);
75  }

The documentation for this class was generated from the following file: