public void insert(String statementName, Object parameter) { goCache.stopServingForTransaction(); delegate.insert(translateStatementName(statementName), parameter); }
@Override protected void createAppliedPatchEntity(AppliedPatchEntity entity) { template.insert(INSERT_APPLIED_PATCH, entity); }
@Override protected void insertNodeAspect(Long nodeId, Long qnameId) { Map<String, Long> aspectParameters = new HashMap<String, Long>(5); aspectParameters.put("nodeId", nodeId); aspectParameters.put("qnameId", qnameId); template.insert(INSERT_NODE_ASPECT, aspectParameters); }
public long insertFeedControl(FeedControlEntity activityFeedControl) throws SQLException { template.insert("alfresco.activities.insert.insert_activity_feedcontrol", activityFeedControl); Long id = activityFeedControl.getId(); return (id != null ? id : -1); }
public long insertFeedEntry(ActivityFeedEntity activityFeed) throws SQLException { template.insert("alfresco.activities.insert.insert_activity_feed", activityFeed); Long id = activityFeed.getId(); return (id != null ? id : -1); }
@Override protected AclEntity createAclEntity(AclEntity entity) { entity.setVersion(0L); template.insert(INSERT_ACL, entity); return entity; }
@Override protected UsageDeltaEntity insertUsageDeltaEntity(UsageDeltaEntity entity) { entity.setVersion(0L); template.insert(INSERT_USAGE_DELTA, entity); return entity; }
@Override protected PermissionEntity createPermissionEntity(PermissionEntity entity) { entity.setVersion(0L); template.insert(INSERT_PERMISSION, entity); return entity; }
public long insertPost(ActivityPostEntity activityPost) throws SQLException { template.insert("alfresco.activities.insert.insert_activity_post", activityPost); Long id = activityPost.getId(); return (id != null ? id : -1); } }
@Override protected PropertyDateValueEntity createDateValue(Date value) { PropertyDateValueEntity entity = new PropertyDateValueEntity(); entity.setValue(value); template.insert(INSERT_PROPERTY_DATE_VALUE, entity); // Done return entity; }
@Override protected Long createAclChangeSetEntity() { AclChangeSetEntity entity = new AclChangeSetEntity(); template.insert(INSERT_ACL_CHANGESET, entity); return entity.getId(); }
@Override protected PropertySerializableValueEntity createSerializableValue(Serializable value) { PropertySerializableValueEntity entity = new PropertySerializableValueEntity(); entity.setSerializableValue(value); template.insert(INSERT_PROPERTY_SERIALIZABLE_VALUE, entity); // Done return entity; }
@Override protected long createAceEntity(AceEntity entity) { entity.setVersion(0L); template.insert(INSERT_ACE, entity); Long id = entity.getId(); return (id != null ? id : -1); }
@Override protected AuditModelEntity createAuditModel(Long contentDataId, long crc) { AuditModelEntity entity = new AuditModelEntity(); entity.setContentDataId(contentDataId); entity.setContentCrc(crc); template.insert(INSERT_MODEL, entity); return entity; }
@Override protected Long createPropertyRoot() { PropertyRootEntity rootEntity = new PropertyRootEntity(); rootEntity.setVersion((short)0); template.insert(INSERT_PROPERTY_ROOT, rootEntity); return rootEntity.getId(); }
@Override protected NamespaceEntity createNamespaceEntity(String uri) { NamespaceEntity entity = new NamespaceEntity(); entity.setVersion(NamespaceEntity.CONST_LONG_ZERO); entity.setUriSafe(uri); template.insert(INSERT_NS, entity); return entity; }
@Override protected LocaleEntity createLocaleEntity(String localeStr) { LocaleEntity localeEntity = new LocaleEntity(); localeEntity.setVersion(LocaleEntity.CONST_LONG_ZERO); localeEntity.setLocaleStr(localeStr); template.insert(INSERT_LOCALE, localeEntity); return localeEntity; } }
@Override protected NamespaceEntity createNamespaceEntity(String uri) { NamespaceEntity entity = new NamespaceEntity(); entity.setVersion(NamespaceEntity.CONST_LONG_ZERO); entity.setUriSafe(uri); template.insert(INSERT_NS, entity); return entity; }
@Override public Pair<Long, String> createContentUrlOrphaned(String contentUrl, Date orphanTime) { ContentUrlEntity contentUrlEntity = new ContentUrlEntity(); contentUrlEntity.setContentUrl(contentUrl); contentUrlEntity.setSize(0L); contentUrlEntity.setOrphanTime(orphanTime == null ? System.currentTimeMillis() : orphanTime.getTime()); template.insert(INSERT_CONTENT_URL, contentUrlEntity); Long id = contentUrlEntity.getId(); // Done return new Pair<Long, String>(id, contentUrl); }
@Override protected AuditEntryEntity createAuditEntry(Long applicationId, long time, Long usernameId, Long valuesId) { AuditEntryEntity entity = new AuditEntryEntity(); entity.setAuditApplicationId(applicationId); entity.setAuditTime(time); entity.setAuditUserId(usernameId); entity.setAuditValuesId(valuesId); template.insert(INSERT_ENTRY, entity); return entity; }