/* (non-Javadoc) * @see mylife.persistence.repository.ActivityLabelRepository#create(java.lang.String) */ @Override public ActivityLabel create(String label) { ActivityLabel actLabel = new ActivityLabel(); actLabel.setLabel(label); getEntityManager().persist(actLabel); return actLabel; }
@Override public void save(ActivityLabel label) { if (label.getKey() == null) { throw new RepositoryException("The entity has not been previously persisted"); } super.merge(label); }