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

Public Member Functions

 CustomerOrderWrapper (CustomerOrder entity)
 
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 canDelete ()
 
boolean canSave ()
 
boolean equals (Object obj)
 
int hashCode ()
 

Static Public Member Functions

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 Member Functions

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

- 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.workorder.CustomerOrderWrapper.CustomerOrderWrapper ( CustomerOrder  entity)

Member Function Documentation

◆ createDao()

Dao org.turro.erp.workorder.CustomerOrderWrapper.createDao ( )
protected

◆ getLines()

static Collection<CustomerOrder> org.turro.erp.workorder.CustomerOrderWrapper.getLines ( CustomerOrder  customerOrder)
static

Definition at line 49 of file bserp-core/src/main/java/org/turro/erp/workorder/CustomerOrderWrapper.java.

49  {
50  WhereClause wc = new WhereClause();
51  wc.addClause("select cu from CustomerOrder as cu");
52  wc.addClause("where cu.customerId = :customerId");
53  wc.addNamedValue("customerId", customerOrder.getCustomerId());
54  if(customerOrder.getOrderId() == null) {
55  wc.addClause("and cu.orderId is null");
56  } else {
57  wc.addClause("and cu.orderId = :orderId");
58  wc.addNamedValue("orderId", customerOrder.getOrderId());
59  }
60  if(customerOrder.getOrderDate() == null) {
61  wc.addClause("and cu.orderDate is null");
62  } else {
63  wc.addClause("and cu.orderDate = :orderDate");
64  wc.addNamedValue("orderDate", customerOrder.getOrderDate());
65  }
66  return new ErpPU().getResultList(wc);
67  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ save()

CustomerOrder org.turro.erp.workorder.CustomerOrderWrapper.save ( )

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

Definition at line 39 of file bserp-core/src/main/java/org/turro/erp/workorder/CustomerOrderWrapper.java.

39  {
40  if(entity.isEmpty()) return entity;
41  return super.save();
42  }

◆ shouldLog()

boolean org.turro.erp.workorder.CustomerOrderWrapper.shouldLog ( )
protected

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