BrightSide Workbench Full Report + Source Code
org.turro.entities.FinancialsEntities Class Reference
Inheritance diagram for org.turro.entities.FinancialsEntities:
Collaboration diagram for org.turro.entities.FinancialsEntities:

Public Member Functions

 FinancialsEntities ()
 
 FinancialsEntities (String entityPath)
 
 FinancialsEntities (Object entity)
 
Object getEntity ()
 
String getName ()
 
String getLabel ()
 
String getDescription ()
 
Object getLabelCtrl ()
 
String getImage ()
 
String getHierarchicalPath ()
 
IElephantEntity getParent ()
 
List< IElephantEntitygetChildren ()
 
String getExtendedPath ()
 
File getFile ()
 
boolean showPath ()
 
boolean showEntity ()
 
boolean canEdit (IContact contact)
 
boolean canPublish (IContact contact)
 
Collection getEntitites (String search, int maxResults, KeyValueMap kvm)
 
Collection getEntitites (String root, String search, int maxResults, KeyValueMap kvm)
 
Object configureCtrl (Object ctrl, IContact contact)
 
boolean canShowInContext (IContact contact, Object relatedEntity)
 
Collection< Object > getRelatedByRole (EntityRole role, IContact contact)
 
boolean hasRelatedRole (EntityRole role, IContact contact)
 
String getExtendedWebPath ()
 
String getUserContext ()
 
Collection< String > getAllowedRoots ()
 
- Public Member Functions inherited from org.turro.entities.DefaultElephantEntity
 DefaultElephantEntity ()
 
 DefaultElephantEntity (String entityPath)
 
 DefaultElephantEntity (Object entity)
 
IElephantEntity getController (String entityPath)
 
IElephantEntity getController (Object entity)
 
boolean isEmpty ()
 
String getStringId ()
 
String getNameOrLabel ()
 
String getRoot ()
 
String getPath ()
 
String getTreeLabel ()
 
Collection getEntitites (String search, int maxResults)
 
Collection getEntitites (String root, String search, int maxResults)
 
IElephantSendable getSendable ()
 
String getLinkRoot ()
 
String getEntityUrl ()
 
String getMemberUrl ()
 
String getAppUrl ()
 
String getEntityUrl (LinkType type, String contextPath)
 
String getReadAllUrl (LinkType type, String contextPath)
 
Object getControl (String name, IContact contact)
 
Object getControl (String name, IConstructor constructor, IContact contact)
 
Object getControl (String name, String entityPath, IContact contact)
 
Object getParticipationControl (IConstructor constructor, ParticipationReason reason)
 
Object getParticipationControl (IConstructor constructor, IContact contact, ParticipationReason reason)
 
String parseSpamCtrl (IConstructor constructor)
 
String parseFollowCtrl (IConstructor constructor)
 
EntitySet getAllChildren ()
 
Script getActorScript ()
 
boolean isActor (String actor)
 
boolean isActor (IContact contact, String actor)
 
ConceptPermission getConceptPermission (String name)
 
Folder getDeliverables ()
 
Object getObject (Path entityPath)
 
IElephantEntity getMain (Object entity)
 
int hashCode ()
 
boolean equals (Object obj)
 

Protected Member Functions

Dao createDao ()
 
boolean itsMine (String rootPath)
 
boolean itsMine (Object entity)
 
IElephantEntity createInstance (String entityPath)
 
IElephantEntity createInstance (Object entity)
 
Path createPath ()
 
- Protected Member Functions inherited from org.turro.entities.DefaultElephantEntity
boolean isValidLongEntity ()
 
Dao getDao ()
 

Additional Inherited Members

- Static Public Attributes inherited from org.turro.entities.IElephantEntity
static final String EMPTY_ID = "#"
 
static final String PATH_SEPARATOR = ";"
 
- Protected Attributes inherited from org.turro.entities.DefaultElephantEntity
String entityPath
 
Path path
 
Object entity
 

Detailed Description

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

Definition at line 65 of file FinancialsEntities.java.

Constructor & Destructor Documentation

◆ FinancialsEntities() [1/3]

org.turro.entities.FinancialsEntities.FinancialsEntities ( )

Definition at line 67 of file FinancialsEntities.java.

67  {
68  }
Here is the caller graph for this function:

◆ FinancialsEntities() [2/3]

org.turro.entities.FinancialsEntities.FinancialsEntities ( String  entityPath)

Definition at line 70 of file FinancialsEntities.java.

◆ FinancialsEntities() [3/3]

org.turro.entities.FinancialsEntities.FinancialsEntities ( Object  entity)

Definition at line 74 of file FinancialsEntities.java.

74  {
75  super(entity);
76  }

Member Function Documentation

◆ canEdit()

boolean org.turro.entities.FinancialsEntities.canEdit ( IContact  contact)

Checks when contact has permissions to edit the entity.

Parameters
contactthe contact checked.
Returns
true when the contact can edit.

Implements org.turro.entities.IElephantEntity.

Definition at line 333 of file FinancialsEntities.java.

333  {
334  if(getEntity() != null) {
335  if(entity instanceof Contract) {
336  return contact.getPermissions().isInRole("finan-contract:edit");
337  } else if(entity instanceof Document) {
338  return contact.getPermissions().isInRole("finan-document:edit");
339  } else if(entity instanceof BatchOf) {
340  return contact.getPermissions().isInRole("finan-document:edit");
341  } else if(entity instanceof Product) {
342  return contact.getPermissions().isInRole("finan-product:edit");
343  } else if(entity instanceof FixedAsset) {
344  return contact.getPermissions().isInRole("finan-fixed-asset:edit");
345  } else if(entity instanceof Register) {
346  return contact.getPermissions().isInRole("finan-register:edit");
347  } else if(entity instanceof Company) {
348  return contact.getPermissions().isInRole("finan-model:edit");
349  }
350  }
351  return false;
352  }
Here is the call graph for this function:

◆ canPublish()

boolean org.turro.entities.FinancialsEntities.canPublish ( IContact  contact)

Checks when contact has permissions to see the entity.

Parameters
contactthe contact checked.
Returns
true when the contact can see.

Implements org.turro.entities.IElephantEntity.

Definition at line 355 of file FinancialsEntities.java.

355  {
356  if(getEntity() != null) {
357  if(entity instanceof Contract) {
358  Contract ctc = (Contract) getEntity();
359  return ctc.getIParticipants().contains(contact);
360  } else if(entity instanceof Document) {
361  Document doc = (Document) getEntity();
362  return doc.getContract().getIParticipants().contains(contact);
363  } else if(entity instanceof BatchOf) {
364  BatchOf doc = (BatchOf) getEntity();
365  return doc.getBatch().getContract().getIParticipants().contains(contact);
366  } else if(entity instanceof Product) {
367  Product prod = (Product) getEntity();
368  return prod.isPublishable();
369  }
370  }
371  return false;
372  }
Here is the call graph for this function:

◆ canShowInContext()

boolean org.turro.entities.FinancialsEntities.canShowInContext ( IContact  contact,
Object  relatedEntity 
)

Checks whether the related entity can be shown to the given contact.

Parameters
contactthe contact to be checked against.
relatedEntitythe related entity to be shown.
Returns
true if can be shown.

Implements org.turro.entities.IElephantEntity.

Definition at line 442 of file FinancialsEntities.java.

442  {
443  return true;
444  }

◆ configureCtrl()

Object org.turro.entities.FinancialsEntities.configureCtrl ( Object  ctrl,
IContact  contact 
)

Configures specific entity related controls for the given contact.

Parameters
ctrlthe control to configure.
contactthe contact who receive the control.
Returns
the configured control.

Implements org.turro.entities.IElephantEntity.

Definition at line 403 of file FinancialsEntities.java.

403  {
404  if(ctrl instanceof CommentItCtrl) {
405  CommentItCtrl ictrl = (CommentItCtrl) ctrl;
406  ictrl.setEntityPath(getPath());
407  return ictrl;
408  } else if(ctrl instanceof AttachCtrl) {
409  AttachCtrl ictrl = (AttachCtrl) ctrl;
410  ictrl.setEntityPath(getPath());
411  if(getEntity() instanceof Contract) {
412  Contract ctc = (Contract) getEntity();
413  ictrl.setPublicOnly(true);
414  if(ctc.getIParticipants().contains(contact)) {
415  ictrl.setPublicOnly(false);
416  }
417  }
418  if(getEntity() instanceof Document) {
419  Contract ctc = (Contract) ((Document) getEntity()).getContract();
420  ictrl.setPublicOnly(true);
421  if(ctc.getIParticipants().contains(contact)) {
422  ictrl.setPublicOnly(false);
423  }
424  }
425  return ictrl;
426  } else if(ctrl instanceof FileAttach) {
427  FileAttach ictrl = (FileAttach) ctrl;
428  return ictrl;
429  } else if(ctrl instanceof DescribeItCtrl) {
430  DescribeItCtrl ictrl = (DescribeItCtrl) ctrl;
431  ictrl.setEntityPath(getPath());
432  return ictrl;
433  } else if(ctrl instanceof IEntityCtrl) {
434  IEntityCtrl ictrl = (IEntityCtrl) ctrl;
435  ictrl.setEntityPath(getPath());
436  return ictrl;
437  }
438  return ctrl;
439  }
Here is the call graph for this function:

◆ createDao()

Dao org.turro.entities.FinancialsEntities.createDao ( )
protected

Reimplemented from org.turro.entities.DefaultElephantEntity.

Definition at line 492 of file FinancialsEntities.java.

492  {
493  return new FinancialsPU();
494  }

◆ createInstance() [1/2]

IElephantEntity org.turro.entities.FinancialsEntities.createInstance ( Object  entity)
protected

Reimplemented from org.turro.entities.DefaultElephantEntity.

Definition at line 525 of file FinancialsEntities.java.

525  {
526  return new FinancialsEntities(entity);
527  }
Here is the call graph for this function:

◆ createInstance() [2/2]

IElephantEntity org.turro.entities.FinancialsEntities.createInstance ( String  entityPath)
protected

Reimplemented from org.turro.entities.DefaultElephantEntity.

Definition at line 520 of file FinancialsEntities.java.

520  {
521  return new FinancialsEntities(entityPath);
522  }
Here is the call graph for this function:

◆ createPath()

Path org.turro.entities.FinancialsEntities.createPath ( )
protected

Reimplemented from org.turro.entities.DefaultElephantEntity.

Definition at line 530 of file FinancialsEntities.java.

530  {
531  return new Path(FinancialsPU.getObjectPath(entity));
532  }
Here is the call graph for this function:

◆ getAllowedRoots()

Collection<String> org.turro.entities.FinancialsEntities.getAllowedRoots ( )

Implements org.turro.entities.IElephantEntity.

Definition at line 514 of file FinancialsEntities.java.

514  {
515  return Arrays.asList("contract", "document", "batchof", "product", "fixed-asset",
516  "company", "headquarters", "department", "service", "register");
517  }

◆ getChildren()

List<IElephantEntity> org.turro.entities.FinancialsEntities.getChildren ( )

Gets the children for this entity.

Returns
the children controllers.

Implements org.turro.entities.IElephantEntity.

Definition at line 278 of file FinancialsEntities.java.

278  {
279  if(getEntity() != null) {
280  if(entity instanceof Contract) {
281  Contract contract = (Contract) entity;
282  return new EntityListAdapter(contract.getDocuments());
283  }
284  }
285  return Collections.EMPTY_LIST;
286  }
Here is the call graph for this function:

◆ getDescription()

String org.turro.entities.FinancialsEntities.getDescription ( )

Gets the entity description.

Returns
the description string.

Implements org.turro.entities.IElephantEntity.

Definition at line 198 of file FinancialsEntities.java.

198  {
199  if(getEntity() != null) {
200  if(entity instanceof Contract) {
201  return ((Contract) entity).getContractDefinition().getDescription();
202  }
203  }
204  return null;
205  }
Here is the call graph for this function:

◆ getEntitites() [1/2]

Collection org.turro.entities.FinancialsEntities.getEntitites ( String  root,
String  search,
int  maxResults,
KeyValueMap  kvm 
)

Implements org.turro.entities.IElephantEntity.

Definition at line 384 of file FinancialsEntities.java.

384  {
385  ArrayList<Object> list = new ArrayList<>();
386  if(null != root) switch (root) {
387  case "contract":
388  list.addAll(searchContracts(search, maxResults, kvm));
389  break;
390  case "product":
391  list.addAll(searchProducts(search, maxResults, kvm));
392  break;
393  case "fixed-asset":
394  list.addAll(searchFixedAssets(search, maxResults, kvm));
395  break;
396  default:
397  break;
398  }
399  return list;
400  }

◆ getEntitites() [2/2]

Collection org.turro.entities.FinancialsEntities.getEntitites ( String  search,
int  maxResults,
KeyValueMap  kvm 
)

Implements org.turro.entities.IElephantEntity.

Definition at line 375 of file FinancialsEntities.java.

375  {
376  ArrayList<Object> list = new ArrayList<>();
377  list.addAll(searchContracts(search, maxResults, kvm));
378  list.addAll(searchProducts(search, maxResults, kvm));
379  list.addAll(searchFixedAssets(search, maxResults, kvm));
380  return list;
381  }

◆ getEntity()

Object org.turro.entities.FinancialsEntities.getEntity ( )

Returns the entity for this controller.

Returns
the entity's object.

Implements org.turro.entities.IElephantEntity.

Definition at line 79 of file FinancialsEntities.java.

79  {
80  if(entity == null) {
81  if(getPath() != null) {
82  if(isValidLongEntity()) {
83  if(null != path.getRoot()) switch (path.getRoot()) {
84  case "contract":
85  entity = getDao().find(Contract.class, path.getNodeAs(1, Long.class));
86  break;
87  case "document":
88  entity = getDao().find(Document.class, path.getNodeAs(1, Long.class));
89  break;
90  case "bacthof":
91  entity = getDao().find(BatchOf.class, path.getNodeAs(1, Long.class));
92  break;
93  case "product":
94  entity = getDao().find(Product.class, path.getNodeAs(1, Long.class));
95  break;
96  case "fixed-asset":
97  entity = getDao().find(FixedAsset.class, path.getNodeAs(1, Long.class));
98  break;
99  case "company":
100  entity = getDao().find(Company.class, path.getNodeAs(1, Long.class));
101  break;
102  case "headquarters":
103  entity = getDao().find(Headquarters.class, path.getNodeAs(1, Long.class));
104  break;
105  case "department":
106  entity = getDao().find(Department.class, path.getNodeAs(1, Long.class));
107  break;
108  case "service":
109  entity = getDao().find(Service.class, path.getNodeAs(1, Long.class));
110  break;
111  case "register":
112  entity = getDao().find(Register.class, path.getNodeAs(1, Long.class));
113  break;
114  case "account":
115  entity = getDao().find(Account.class, path.getNode(1));
116  break;
117  case "major-account":
118  entity = getDao().find(MajorAccount.class, path.getNodeAs(1, Long.class));
119  break;
120  default:
121  break;
122  }
123  }
124  }
125  }
126  return entity;
127  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getExtendedPath()

String org.turro.entities.FinancialsEntities.getExtendedPath ( )

Gets the extended path for this entity.

Returns
the extended path string.

Implements org.turro.entities.IElephantEntity.

Definition at line 289 of file FinancialsEntities.java.

289  {
290  return FinancialsPU.getObjectExtendedPath(entity);
291  }
Here is the call graph for this function:

◆ getExtendedWebPath()

String org.turro.entities.FinancialsEntities.getExtendedWebPath ( )

Returns a unique path for the entity.

Returns
the path string.

Implements org.turro.entities.IElephantEntity.

Definition at line 475 of file FinancialsEntities.java.

475  {
476  if(getEntity() != null) {
477  if(entity instanceof Contract) {
478  Contract contract = (Contract) entity;
479  return "/" + contract.getId() +
480  "/" + Strings.unpunctuate(contract.getName()).toLowerCase();
481  }
482  }
483  return null;
484  }
Here is the call graph for this function:

◆ getFile()

File org.turro.entities.FinancialsEntities.getFile ( )

Gets the file represented by the entity.

Returns
the entity file.

Implements org.turro.entities.IElephantEntity.

Definition at line 294 of file FinancialsEntities.java.

294  {
295  return null;
296  }

◆ getHierarchicalPath()

String org.turro.entities.FinancialsEntities.getHierarchicalPath ( )

Gets the hierarchical path for this entity. Mostly used for sorting purposes.

Returns
the hierarchical path string.

Implements org.turro.entities.IElephantEntity.

Definition at line 254 of file FinancialsEntities.java.

254  {
255  if(getEntity() != null) {
256  if(entity instanceof Document) {
257  Contract contract = ((Document) entity).getContract();
258  return FinancialsPU.getObjectPath(contract) +
260  }
261  }
262  return getPath();
263  }
Here is the call graph for this function:

◆ getImage()

String org.turro.entities.FinancialsEntities.getImage ( )

Gets the entity image based on its root.

Returns
the string image location.

Implements org.turro.entities.IElephantEntity.

Definition at line 222 of file FinancialsEntities.java.

222  {
223  if(getPath() != null) {
224  String root = path.getRoot();
225  if(null != root) switch (root) {
226  case "contract":
227  return "/_zul/images/contract.png";
228  case "document":
229  return "/_zul/images/document.png";
230  case "batchof":
231  return "/_zul/images/batchof.png";
232  case "product":
233  return "/_zul/images/product.png";
234  case "fixed-asset":
235  return "/_zul/images/asset.png";
236  case "company":
237  return "/_zul/images/b_company.png";
238  case "headquarters":
239  return "/_zul/images/b_headquarters.png";
240  case "department":
241  return "/_zul/images/b_department.png";
242  case "service":
243  return "/_zul/images/b_service.png";
244  case "register":
245  return "/_zul/images/register.png";
246  default:
247  break;
248  }
249  }
250  return null;
251  }
Here is the call graph for this function:

◆ getLabel()

String org.turro.entities.FinancialsEntities.getLabel ( )

Gets the entity label, based on its root.

Returns
the entity string label.

Implements org.turro.entities.IElephantEntity.

Definition at line 162 of file FinancialsEntities.java.

162  {
163  if(getPath() != null) {
164  String root = path.getRoot();
165  if(null != root) switch (root) {
166  case "contract":
167  return I_.get("Contract");
168  case "document":
169  return I_.get("Document");
170  case "batchof":
171  return I_.get("Batch of");
172  case "product":
173  return I_.get("Product");
174  case "fixed-asset":
175  return I_.get("Fixed asset");
176  case "company":
177  return I_.get("Company");
178  case "headquarters":
179  return I_.get("Headquarters");
180  case "department":
181  return I_.get("Department");
182  case "service":
183  return I_.get("Service");
184  case "register":
185  return I_.get("Register");
186  case "account":
187  return I_.get("Account");
188  case "major-account":
189  return I_.get("Major account");
190  default:
191  break;
192  }
193  }
194  return null;
195  }
Here is the call graph for this function:

◆ getLabelCtrl()

Object org.turro.entities.FinancialsEntities.getLabelCtrl ( )

Gets the label control, usually a clickable LabelControl class.

Returns
a clickable label control.

Implements org.turro.entities.IElephantEntity.

Definition at line 208 of file FinancialsEntities.java.

208  {
209  if(getEntity() != null) {
210  if(entity instanceof Document) {
211  return new DocumentLabel(entity);
212  } else if(entity instanceof BatchOf) {
213  return new DocumentLabel(entity);
214  } else {
215  return new LabelControl(entity);
216  }
217  }
218  return null;
219  }
Here is the call graph for this function:

◆ getName()

String org.turro.entities.FinancialsEntities.getName ( )

Gets the entity name.

Returns
the string name.

Implements org.turro.entities.IElephantEntity.

Definition at line 130 of file FinancialsEntities.java.

130  {
131  if(getEntity() != null) {
132  if(entity instanceof Contract) {
133  return ((Contract) entity).getId() + " - " +((Contract) entity).getFullDescription();
134  } else if(entity instanceof Document) {
135  return ((Document) entity).getDocDescription();
136  } else if(entity instanceof BatchOf) {
137  return ((BatchOf) entity).getBatch().getDocDescription();
138  } else if(entity instanceof Product) {
139  return ((Product) entity).getProductString();
140  } else if(entity instanceof FixedAsset) {
141  return ((FixedAsset) entity).getId() + " - " + ((FixedAsset) entity).getName();
142  } else if(entity instanceof Company) {
143  return ((Company) entity).getName();
144  } else if(entity instanceof Headquarters) {
145  return ((Headquarters) entity).getName();
146  } else if(entity instanceof Department) {
147  return ((Department) entity).getFullName();
148  } else if(entity instanceof Service) {
149  return ((Service) entity).getFullName();
150  } else if(entity instanceof Register) {
151  return ((Register) entity).getIdRegister() + " " + DateFormats.format(((Register) entity).getRegisterDate(), true);
152  } else if(entity instanceof Account) {
153  return ((Account) entity).getId() + " - " + ((Account) entity).getDescription();
154  } else if(entity instanceof MajorAccount) {
155  return ((MajorAccount) entity).getAccount()+ " - " + ((MajorAccount) entity).getDescription();
156  }
157  }
158  return null;
159  }
Here is the call graph for this function:

◆ getParent()

IElephantEntity org.turro.entities.FinancialsEntities.getParent ( )

Gets the parent for this entity.

Returns
the parent controller.

Implements org.turro.entities.IElephantEntity.

Definition at line 266 of file FinancialsEntities.java.

266  {
267  if(getEntity() != null) {
268  if(entity instanceof Contract) {
269  return Entities.getController("/contact/" + ((Contract) entity).getContractor());
270  } else if(entity instanceof Document) {
271  return Entities.getController(((Document) entity).getContract());
272  }
273  }
274  return null;
275  }
Here is the call graph for this function:

◆ getRelatedByRole()

Collection<Object> org.turro.entities.FinancialsEntities.getRelatedByRole ( EntityRole  role,
IContact  contact 
)

Gets entities where contact has the specified role.

Parameters
rolethe role to conform.
contactthe contact to check.
Returns
a collection of entities.

Reimplemented from org.turro.entities.DefaultElephantEntity.

Definition at line 447 of file FinancialsEntities.java.

447  {
448  switch(role) {
449  case SELF_AS_COMPANY_OWNER:
450  return getRelatedEntities(role, contact);
451  }
452  return Collections.EMPTY_LIST;
453  }

◆ getUserContext()

String org.turro.entities.FinancialsEntities.getUserContext ( )

Returns the user context for this type of entity

Returns
the path string;

Implements org.turro.entities.IElephantEntity.

Definition at line 487 of file FinancialsEntities.java.

487  {
488  return "/user/" + getLinkRoot() + "s";
489  }
Here is the call graph for this function:

◆ hasRelatedRole()

boolean org.turro.entities.FinancialsEntities.hasRelatedRole ( EntityRole  role,
IContact  contact 
)

Checks whether contact has the specified role.

Parameters
rolethe role to conform.
contactthe contact to check.
Returns
true if contact has role.

Reimplemented from org.turro.entities.DefaultElephantEntity.

Definition at line 456 of file FinancialsEntities.java.

456  {
457  switch(role) {
458  case SELF_AS_COMPANY_OWNER:
459  if(getEntity() instanceof Contract) {
460  if(((Contract) getEntity()).getContractor().equals(contact.getId())) {
461  return true;
462  }
463  for(ContractParticipant cp : ((Contract) getEntity()).getParticipants()) {
464  if(cp.isSignature() && cp.getIdContact().equals(contact.getId())) {
465  return true;
466  }
467  }
468  }
469  break;
470  }
471  return false;
472  }
Here is the call graph for this function:

◆ itsMine() [1/2]

boolean org.turro.entities.FinancialsEntities.itsMine ( Object  entity)
protected

Reimplemented from org.turro.entities.DefaultElephantEntity.

Definition at line 504 of file FinancialsEntities.java.

504  {
505  return (entity instanceof Contract) || (entity instanceof Document) || (entity instanceof BatchOf) ||
506  (entity instanceof Product) || (entity instanceof FixedAsset) || (entity instanceof Company) ||
507  (entity instanceof Headquarters) || (entity instanceof Department) || (entity instanceof Service) ||
508  (entity instanceof Register) ||
509  // Only for label purposes
510  (entity instanceof Account) || (entity instanceof MajorAccount);
511  }

◆ itsMine() [2/2]

boolean org.turro.entities.FinancialsEntities.itsMine ( String  rootPath)
protected

Reimplemented from org.turro.entities.DefaultElephantEntity.

Definition at line 497 of file FinancialsEntities.java.

497  {
498  return super.itsMine(rootPath) ||
499  // Only for label purposes
500  "account".equals(rootPath) || "major-account".equals(rootPath);
501  }

◆ showEntity()

boolean org.turro.entities.FinancialsEntities.showEntity ( )

Shows the view for the entity.

Returns
true when a view is shown.

Implements org.turro.entities.IElephantEntity.

Definition at line 304 of file FinancialsEntities.java.

304  {
305  if(getEntity() != null) {
306  if(entity instanceof Contract) {
307  FinancialsMenu.showContract(((Contract) entity).getId());
308  return true;
309  } else if(entity instanceof Document) {
310  FinancialsMenu.showDocument(((Document) entity).getId());
311  return true;
312  } else if(entity instanceof BatchOf) {
313  FinancialsMenu.showBatchOf(((BatchOf) entity).getId());
314  return true;
315  } else if(entity instanceof Product) {
316  FinancialsMenu.showProduct(((Product) entity).getId());
317  return true;
318  } else if(entity instanceof FixedAsset) {
319  FinancialsMenu.showFixedAsset(((FixedAsset) entity).getId());
320  return true;
321  } else if(entity instanceof Register) {
322  FinancialsMenu.showRegister(((Register) entity).getId());
323  return true;
324  } else if(entity instanceof Company) {
325  FinancialsMenu.showCompanies();
326  return true;
327  }
328  }
329  return false;
330  }
Here is the call graph for this function:

◆ showPath()

boolean org.turro.entities.FinancialsEntities.showPath ( )

Shows the view for this path.

Returns
true when a view is shown.

Implements org.turro.entities.IElephantEntity.

Definition at line 299 of file FinancialsEntities.java.

299  {
300  return false;
301  }

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