use of com.liferay.blade.workflow.asset.model.Qux in project liferay-blade-samples by liferay.
the class QuxModelImpl method toString.
@Override
public String toString() {
Map<String, Function<Qux, Object>> attributeGetterFunctions = getAttributeGetterFunctions();
StringBundler sb = new StringBundler(4 * attributeGetterFunctions.size() + 2);
sb.append("{");
for (Map.Entry<String, Function<Qux, Object>> entry : attributeGetterFunctions.entrySet()) {
String attributeName = entry.getKey();
Function<Qux, Object> attributeGetterFunction = entry.getValue();
sb.append(attributeName);
sb.append("=");
sb.append(attributeGetterFunction.apply((Qux) this));
sb.append(", ");
}
if (sb.index() > 1) {
sb.setIndex(sb.index() - 1);
}
sb.append("}");
return sb.toString();
}
use of com.liferay.blade.workflow.asset.model.Qux in project liferay-blade-samples by liferay.
the class QuxLocalServiceImpl method updateStatus.
@Override
public Qux updateStatus(long userId, long quxId, int status) throws PortalException {
User user = userLocalService.getUser(userId);
Qux qux = getQux(quxId);
qux.setStatus(status);
qux.setStatusByUserId(user.getUserId());
qux.setStatusByUserName(user.getFullName());
qux.setStatusDate(new Date());
return updateQux(qux);
}
use of com.liferay.blade.workflow.asset.model.Qux in project liferay-blade-samples by liferay.
the class QuxLocalServiceImpl method deleteQux.
@Override
public Qux deleteQux(long quxId) throws PortalException {
Qux qux = quxPersistence.remove(quxId);
assetEntryLocalService.deleteEntry(Qux.class.getName(), quxId);
workflowInstanceLinkLocalService.deleteWorkflowInstanceLinks(qux.getCompanyId(), qux.getGroupId(), Qux.class.getName(), qux.getPrimaryKey());
return qux;
}
use of com.liferay.blade.workflow.asset.model.Qux in project liferay-blade-samples by liferay.
the class QuxPersistenceTest method testFetchByPrimaryKeyExisting.
@Test
public void testFetchByPrimaryKeyExisting() throws Exception {
Qux newQux = addQux();
Qux existingQux = _persistence.fetchByPrimaryKey(newQux.getPrimaryKey());
Assert.assertEquals(existingQux, newQux);
}
use of com.liferay.blade.workflow.asset.model.Qux in project liferay-blade-samples by liferay.
the class QuxPersistenceTest method testResetOriginalValues.
@Test
public void testResetOriginalValues() throws Exception {
Qux newQux = addQux();
_persistence.clearCache();
Qux existingQux = _persistence.findByPrimaryKey(newQux.getPrimaryKey());
Assert.assertTrue(Objects.equals(existingQux.getUuid(), ReflectionTestUtil.invoke(existingQux, "getOriginalUuid", new Class<?>[0])));
Assert.assertEquals(Long.valueOf(existingQux.getGroupId()), ReflectionTestUtil.<Long>invoke(existingQux, "getOriginalGroupId", new Class<?>[0]));
}
Aggregations