BrightSide Workbench Full Report + Source Code
org.turro.financials.linetype.BillLineTypeListbox Class Reference
Inheritance diagram for org.turro.financials.linetype.BillLineTypeListbox:
Collaboration diagram for org.turro.financials.linetype.BillLineTypeListbox:

Public Member Functions

void setData (Contract contract, long lineTypeId, long contractPreferenceId)
 
- Public Member Functions inherited from org.turro.financials.linetype.LineTypePreferenceListbox
 LineTypePreferenceListbox ()
 
 LineTypePreferenceListbox (Document document)
 
 LineTypePreferenceListbox (Document document, DocumentDefinition descendant)
 
void setDocument (Document document)
 
void setRegexp (String regexp)
 
- Public Member Functions inherited from org.turro.zkoss.input.CollectionListbox< V >
 CollectionListbox ()
 
 CollectionListbox (Collection< V > collection)
 
void updateCollection ()
 
void updateCollection (Collection< V > collection)
 
boolean isAllowNull ()
 
void setAllowNull (boolean allowNull)
 
Collection< V > getCollection ()
 
void setCollection (Collection< V > collection)
 
boolean isNullAtBottom ()
 
void setNullAtBottom (boolean nullAtBottom)
 
String getNullLabel ()
 
void setNullLabel (String nullLabel)
 
- Public Member Functions inherited from org.turro.zkoss.input.GenericListbox< V >
 GenericListbox ()
 
void setDisabled (boolean value)
 
void afterCompose ()
 
void clearItems ()
 
void setObjectValue (V value)
 
void setObjectValues (Collection< V > collection)
 
getObjectValue ()
 
Collection< V > getObjectValues ()
 
Collection< V > getDeselectedObjectValues ()
 
boolean isSelectFirst ()
 
void setSelectFirst (boolean selectFirst)
 
Set getDeselectedItems ()
 
void sort ()
 
Object getRelatedEntity ()
 
void setRelatedEntity (Object relatedEntity)
 

Additional Inherited Members

- Static Public Attributes inherited from org.turro.zkoss.input.CollectionListbox< V >
static final String ITEM_SEPARATOR = "|||"
 
- Protected Member Functions inherited from org.turro.financials.linetype.LineTypePreferenceListbox
String convertToString (LineType v)
 
- Protected Member Functions inherited from org.turro.zkoss.input.CollectionListbox< V >
void populateList ()
 
boolean equals (V value, V obj)
 
abstract String convertToString (V v)
 
void beforeAppend (Listitem li)
 
- Protected Attributes inherited from org.turro.zkoss.input.GenericListbox< V >
boolean populated = false
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 34 of file BillLineTypeListbox.java.

Member Function Documentation

◆ setData()

void org.turro.financials.linetype.BillLineTypeListbox.setData ( Contract  contract,
long  lineTypeId,
long  contractPreferenceId 
)

Definition at line 36 of file BillLineTypeListbox.java.

36  {
37  if(contract != null) {
38  Document document = new BillDocument(contract);
39  Collection<LineType> types = document.getLineTypes();
40  Iterator<LineType> it = types.iterator();
41  while(it.hasNext()) {
42  long id = it.next().getId();
43  if(!(id == 108L || id == 4L)) {
44  it.remove();
45  }
46  }
47  updateCollection(types);
48  Dao dao = new FinancialsPU();
49  LineType lt = dao.find(LineType.class, lineTypeId == 0L ? 4L : lineTypeId);
50  if(lt != null) {
51  lt.setContractPreference(contractPreferenceId == 0L ?
52  document.getDefaultContractPreference() :
53  dao.find(ContractPreference.class, contractPreferenceId));
54  setObjectValue(lt);
55  }
56  }
57  }
Here is the call graph for this function:
Here is the caller graph for this function:

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