本文整理了Java中org.bonitasoft.engine.recorder.Recorder.recordInsert
方法的一些代码示例,展示了Recorder.recordInsert
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Recorder.recordInsert
方法的具体详情如下:
包路径:org.bonitasoft.engine.recorder.Recorder
类名称:Recorder
方法名:recordInsert
[英]Add a record to database
[中]将记录添加到数据库
代码示例来源:origin: bonitasoft/bonita-engine
@Override
public void add(long processDefinitionId, String name, BARResourceType type, byte[] content) throws SRecorderException {
SBARResource resource = new SBARResource(name, type, processDefinitionId, content);
recorder.recordInsert(new InsertRecord(resource), BAR_RESOURCE);
}
代码示例来源:origin: bonitasoft/bonita-engine
private SIcon createIcon(String iconFilename, byte[] iconContent) throws SRecorderException {
SIconImpl entity = new SIconImpl(getContentType(iconFilename), iconContent);
recorder.recordInsert(new InsertRecord(entity), ICON);
return entity;
}
代码示例来源:origin: bonitasoft/bonita-engine
private SIcon createIcon(String iconFilename, byte[] iconContent) throws SRecorderException {
SIconImpl entity = new SIconImpl(getContentType(iconFilename), iconContent);
recorder.recordInsert(new InsertRecord(entity), ICON);
return entity;
}
代码示例来源:origin: bonitasoft/bonita-engine
@Override
public void addPendingActivityMappings(final SPendingActivityMapping mapping) throws SActivityCreationException {
try {
getRecorder().recordInsert(new InsertRecord(mapping), PENDINGACTIVITYMAPPING);
} catch (final SRecorderException e) {
throw new SActivityCreationException(e);
}
}
代码示例来源:origin: bonitasoft/bonita-engine
@Override
public void createDataInstance(final SDataInstance dataInstance) throws SDataInstanceException {
try {
recorder.recordInsert(new InsertRecord(dataInstance), DATA_INSTANCE);
} catch (final SRecorderException e) {
throw new SCreateDataInstanceException("Impossible to create data instance.", e);
}
archiveDataInstance(dataInstance);
}
代码示例来源:origin: bonitasoft/bonita-engine
@Override
public void createWaitingEvent(final SWaitingEvent waitingEvent) throws SWaitingEventCreationException {
try {
getRecorder().recordInsert(new InsertRecord(waitingEvent), EVENT_TRIGGER_INSTANCE);
} catch (final SRecorderException e) {
throw new SWaitingEventCreationException(e);
}
}
代码示例来源:origin: bonitasoft/bonita-engine
@Override
public void createProcessInstance(final SProcessInstance processInstance) throws SProcessInstanceCreationException {
try {
recorder.recordInsert(new InsertRecord(processInstance), PROCESSINSTANCE);
setProcessState(processInstance, ProcessInstanceState.INITIALIZING);
} catch (final SRecorderException | SProcessInstanceModificationException sre) {
throw new SProcessInstanceCreationException(sre);
}
}
代码示例来源:origin: bonitasoft/bonita-engine
@Override
public void createMessageInstance(final SMessageInstance messageInstance) throws SMessageInstanceCreationException {
try {
getRecorder().recordInsert(new InsertRecord(messageInstance), MESSAGE_INSTANCE);
} catch (final SRecorderException e) {
throw new SMessageInstanceCreationException(e);
}
}
代码示例来源:origin: bonitasoft/bonita-engine
private SDocumentMapping create(final long documentId, final long processInstanceId, final String name, final String description, final int index)
throws SRecorderException {
final SDocumentMappingImpl documentMapping = new SDocumentMappingImpl(documentId, processInstanceId, name);
documentMapping.setDescription(description);
documentMapping.setVersion("1");
documentMapping.setIndex(index);
recorder.recordInsert(new InsertRecord(documentMapping), DOCUMENTMAPPING);
return documentMapping;
}
代码示例来源:origin: bonitasoft/bonita-engine
private SDocumentMapping create(final long documentId, final long processInstanceId, final String name, final String description, final int index)
throws SRecorderException {
final SDocumentMappingImpl documentMapping = new SDocumentMappingImpl(documentId, processInstanceId, name);
documentMapping.setDescription(description);
documentMapping.setVersion("1");
documentMapping.setIndex(index);
recorder.recordInsert(new InsertRecord(documentMapping), DOCUMENTMAPPING);
return documentMapping;
}
代码示例来源:origin: bonitasoft/bonita-engine
private void insertFormMapping(SFormMappingImpl sFormMapping, SPageMapping sPageMapping) throws SObjectCreationException {
sFormMapping.setPageMapping(sPageMapping);
FormMappingLogBuilder logBuilder = getLogBuilder(ActionType.CREATED);
try {
recorder.recordInsert(new InsertRecord(sFormMapping), FORM_MAPPING);
log(sFormMapping, SQueriableLog.STATUS_OK, logBuilder, "insertFormMapping", "create");
} catch (SRecorderException e) {
log(sFormMapping, SQueriableLog.STATUS_FAIL, logBuilder, "insertFormMapping", "failed to create");
throw new SObjectCreationException(e);
}
}
代码示例来源:origin: bonitasoft/bonita-engine
@Override
public SRefBusinessDataInstance addRefBusinessDataInstance(final SRefBusinessDataInstance instance) throws SRefBusinessDataInstanceCreationException {
final SRefBusinessDataInstanceLogBuilder logBuilder = getQueriableLog(ActionType.CREATED, NEW_REF_BUSINESS_DATA_INSTANCE_ADDED);
try {
recorder.recordInsert(new InsertRecord(instance), REF_BUSINESS_DATA_INSTANCE);
initiateLogBuilder(instance.getId(), SQueriableLog.STATUS_OK, logBuilder, "addRefBusinessDataInstance");
} catch (final SBonitaException sbe) {
initiateLogBuilder(instance.getId(), SQueriableLog.STATUS_FAIL, logBuilder, "addRefBusinessDataInstance");
throw new SRefBusinessDataInstanceCreationException(sbe);
}
return instance;
}
代码示例来源:origin: bonitasoft/bonita-engine
@Override
public SComment addComment(long processInstanceId, String comment, long userId) throws SCommentAddException {
NullCheckingUtil.checkArgsNotNull(processInstanceId);
NullCheckingUtil.checkArgsNotNull(comment);
try {
final SComment sComment = BuilderFactory.get(SHumanCommentBuilderFactory.class).createNewInstance(processInstanceId, comment, userId).done();
recorder.recordInsert(new InsertRecord(sComment), COMMENT);
return sComment;
} catch (final SRecorderException e) {
throw new SCommentAddException(processInstanceId, "human", e);
}
}
代码示例来源:origin: bonitasoft/bonita-engine
protected void addUserTaskData(final STaskContractData taskContractData) throws SContractDataCreationException {
final SContractDataLogBuilder logBuilder = getQueriableLog(ActionType.CREATED, "Creating a new user task contract data", USERTASK_CONTRACT_DATA);
try {
recorder.recordInsert(new InsertRecord(taskContractData), USERTASK_CONTRACT_DATA);
initiateLogBuilder(taskContractData.getId(), SQueriableLog.STATUS_OK, logBuilder, "addUserTaskData");
} catch (final SRecorderException re) {
initiateLogBuilder(taskContractData.getId(), SQueriableLog.STATUS_FAIL, logBuilder, "addUserTaskData");
throw new SContractDataCreationException(re);
}
}
代码示例来源:origin: bonitasoft/bonita-engine
protected void addProcessData(SProcessContractData processContractData) throws SContractDataCreationException {
final SContractDataLogBuilder logBuilder = getQueriableLog(ActionType.CREATED, "Creating a new process contract data", PROCESS_CONTRACT_DATA);
try {
recorder.recordInsert(new InsertRecord(processContractData), PROCESS_CONTRACT_DATA);
initiateLogBuilder(processContractData.getId(), SQueriableLog.STATUS_OK, logBuilder, "addProcessData");
} catch (final SRecorderException re) {
initiateLogBuilder(processContractData.getId(), SQueriableLog.STATUS_FAIL, logBuilder, "addProcessData");
throw new SContractDataCreationException(re);
}
}
代码示例来源:origin: bonitasoft/bonita-engine
@Override
public SProfileEntry createProfileEntry(final SProfileEntry profileEntry) throws SProfileEntryCreationException {
final SProfileLogBuilderImpl logBuilder = getSProfileLog(ActionType.CREATED, "Adding a new pofile entry");
try {
recorder.recordInsert(new InsertRecord(profileEntry), ENTRY_PROFILE);
log(profileEntry.getId(), SQueriableLog.STATUS_OK, logBuilder, "createProfileEntry");
return profileEntry;
} catch (final SRecorderException re) {
log(profileEntry.getId(), SQueriableLog.STATUS_FAIL, logBuilder, "createProfileEntry");
throw new SProfileEntryCreationException(re);
}
}
代码示例来源:origin: bonitasoft/bonita-engine
protected void addProcessData(SProcessContractData processContractData) throws SContractDataCreationException {
final SContractDataLogBuilder logBuilder = getQueriableLog(ActionType.CREATED, "Creating a new process contract data", PROCESS_CONTRACT_DATA);
try {
recorder.recordInsert(new InsertRecord(processContractData), PROCESS_CONTRACT_DATA);
initiateLogBuilder(processContractData.getId(), SQueriableLog.STATUS_OK, logBuilder, "addProcessData");
} catch (final SRecorderException re) {
initiateLogBuilder(processContractData.getId(), SQueriableLog.STATUS_FAIL, logBuilder, "addProcessData");
throw new SContractDataCreationException(re);
}
}
代码示例来源:origin: bonitasoft/bonita-engine
@Override
public SRefBusinessDataInstance addRefBusinessDataInstance(final SRefBusinessDataInstance instance) throws SRefBusinessDataInstanceCreationException {
final SRefBusinessDataInstanceLogBuilder logBuilder = getQueriableLog(ActionType.CREATED, NEW_REF_BUSINESS_DATA_INSTANCE_ADDED);
try {
recorder.recordInsert(new InsertRecord(instance), REF_BUSINESS_DATA_INSTANCE);
initiateLogBuilder(instance.getId(), SQueriableLog.STATUS_OK, logBuilder, "addRefBusinessDataInstance");
} catch (final SBonitaException sbe) {
initiateLogBuilder(instance.getId(), SQueriableLog.STATUS_FAIL, logBuilder, "addRefBusinessDataInstance");
throw new SRefBusinessDataInstanceCreationException(sbe);
}
return instance;
}
代码示例来源:origin: bonitasoft/bonita-engine
private SActorMember addActorMember(final SActorMemberImpl actorMember) throws SActorMemberCreationException {
final SActorLogBuilder logBuilder = getQueriableLog(ActionType.CREATED, "Creating a new actor member");
try {
recorder.recordInsert(new InsertRecord(actorMember), ACTOR_MEMBER);
initiateLogBuilder(actorMember.getId(), SQueriableLog.STATUS_OK, logBuilder, "addActorMember");
return actorMember;
} catch (final SRecorderException re) {
initiateLogBuilder(actorMember.getId(), SQueriableLog.STATUS_FAIL, logBuilder, "addActorMember");
throw new SActorMemberCreationException(re);
}
}
代码示例来源:origin: bonitasoft/bonita-engine
private void insertUserLogin(String methodName, SUser hashedUser, SUserLogBuilder logBuilder) throws SRecorderException {
SUserLoginImpl sUserLogin = new SUserLoginImpl();
((SUserImpl) hashedUser).setsUserLogin(sUserLogin);
sUserLogin.setsUser(hashedUser);
sUserLogin.setId(hashedUser.getId());
sUserLogin.setTenantId(((SUserImpl) hashedUser).getTenantId());
recorder.recordInsert(new InsertRecord(sUserLogin), USER_LOGIN);
log(hashedUser.getId(), SQueriableLog.STATUS_OK, logBuilder, methodName);
}
内容来源于网络,如有侵权,请联系作者删除!