public BusinessObjectService getBusinessObjectService() { if(businessObjectService == null) { businessObjectService = KRADServiceLocator.getBusinessObjectService(); } return businessObjectService; }
protected SequenceAccessorService getSequenceAccessorService() { if (sequenceAccessorService == null) { sequenceAccessorService = KRADServiceLocator.getSequenceAccessorService(); } return sequenceAccessorService; }
protected AttachmentService getAttachmentService() { if (attachmentService == null) { attachmentService = KRADServiceLocator.getAttachmentService(); } return this.attachmentService; }
@Override protected EntityBo constructEntity(Element userElement) { SequenceAccessorService sas = KRADServiceLocator.getSequenceAccessorService(); KRADServiceLocator.getBusinessObjectService().save(entity); email.setEntityId(entity.getId()); KRADServiceLocator.getBusinessObjectService().save(email);
public DataObjectService getDataObjectService() { if(dataObjectService == null){ return KRADServiceLocator.getDataObjectService(); } return dataObjectService; }
protected NoteService getNoteService() { if (noteService == null) { noteService = KRADServiceLocator.getNoteService(); } return this.noteService; }
/** * {@inheritDoc} */ @Override protected BusinessObjectSerializerService getBusinessObjectSerializerService() { return KRADServiceLocator.getBusinessObjectSerializerService(); }
public EntityManagerFactory getEntityManagerFactory() { if (entityManagerFactory == null) { entityManagerFactory = KRADServiceLocator.getApplicationEntityManagerFactory(); } return this.entityManagerFactory; }
/** * Gets the {@link DataObjectService}. * * @return the {@link DataObjectService} */ public DataObjectService getDataObjectService() { if (dataObjectService == null) { dataObjectService = KRADServiceLocator.getDataObjectService(); } return dataObjectService; }
protected NoteService getNoteService() { if ( noteService == null ) { noteService = KRADServiceLocator.getNoteService(); } return this.noteService; } }
public BusinessObjectService getBusinessObjectService() { if (null == businessObjectService) { businessObjectService = KRADServiceLocator.getBusinessObjectService(); } return businessObjectService; }
protected void setupNewPositionRecord(MaintenanceDocument document) { PositionBo aPosition = (PositionBo) document.getNewMaintainableObject().getDataObject(); aPosition.setProcess("New"); String positionNumber = KRADServiceLocator.getSequenceAccessorService().getNextAvailableSequenceNumber("hr_position_s", PositionBo.class).toString(); aPosition.setPositionNumber(positionNumber); document.getDocumentHeader().setDocumentDescription("New Position"); }
public DataObjectService getDataObjectService() { if (dataObjectService == null) { dataObjectService = KRADServiceLocator.getDataObjectService(); } return dataObjectService; } }
noteText += visitor.getCollectionMessages(); KRADServiceLocator.getNoteService().save(createNote(noteText, noteTarget, currentPosition.getUserPrincipalId()));
public InputStream getAttachmentContents() throws IOException { return KRADServiceLocator.getAttachmentService().retrieveAttachmentContents(this); } }
private RemoteSwipeDevice getRemoteSwipeDeviceUsingIpAddress(String ipAddress){ Map<String, String> fields = new HashMap<String, String>(); fields.put("ipAddress", ipAddress); RemoteSwipeDevice remoteSwipeDevice = KRADServiceLocator.getBusinessObjectService().findByPrimaryKey(RemoteSwipeDevice.class, fields); return remoteSwipeDevice; }
/** * This method returns a reference to the dataObjectService. * If the dataObjectService is not set, get it from the KRADServiceLocator. * @return dataObjectService */ protected DataObjectService getDataObjectService() { if ( dataObjectService == null ) { dataObjectService = KRADServiceLocator.getDataObjectService(); } return dataObjectService; }
/** * @return the attachmentLink */ public String getAttachmentLink() { //getAttachment() is always return null. Attachment attachment = KRADServiceLocator.getAttachmentService().getAttachmentByNoteId(Note.this.getNoteIdentifier()); if(attachment == null) { return ""; } else{ Properties params = new Properties(); params.put(KRADConstants.DISPATCH_REQUEST_PARAMETER, KRADConstants.DOWNLOAD_BO_ATTACHMENT_METHOD); params.put(KRADConstants.DOC_FORM_KEY, "88888888"); params.put(KRADConstants.NOTE_IDENTIFIER, this.getNoteIdentifier().toString()); return UrlFactory.parameterizeUrl(KRADConstants.INQUIRY_ACTION, params); } }
@Override public void saveOrUpdate(LeavePayout payout) { KRADServiceLocator.getBusinessObjectService().save(payout); }
public DataObjectService getDataObjectService() { if (dataObjectService == null) { return KRADServiceLocator.getDataObjectService(); } return dataObjectService; }