org.jboss.pressgang.ccms.provider.DBTranslatedTopicStringProvider Maven / Gradle / Ivy
package org.jboss.pressgang.ccms.provider;
import javax.persistence.EntityManager;
import java.util.ArrayList;
import java.util.List;
import org.jboss.pressgang.ccms.model.TranslatedTopicString;
import org.jboss.pressgang.ccms.provider.listener.ProviderListener;
import org.jboss.pressgang.ccms.wrapper.TranslatedTopicStringWrapper;
import org.jboss.pressgang.ccms.wrapper.TranslatedTopicWrapper;
import org.jboss.pressgang.ccms.wrapper.collection.CollectionWrapper;
public class DBTranslatedTopicStringProvider extends DBDataProvider implements TranslatedTopicStringProvider {
protected DBTranslatedTopicStringProvider(EntityManager entityManager, DBProviderFactory providerFactory, List listeners) {
super(entityManager, providerFactory, listeners);
}
@Override
public CollectionWrapper getTranslatedTopicStringRevisions(int id, Integer revision) {
final List revisions = getRevisionList(TranslatedTopicString.class, id);
return getWrapperFactory().createCollection(revisions, TranslatedTopicString.class, revision != null);
}
@Override
public TranslatedTopicStringWrapper newTranslatedTopicString(final TranslatedTopicWrapper translatedTopic) {
return getWrapperFactory().create(new TranslatedTopicString(), false);
}
@Override
public CollectionWrapper newTranslatedTopicStringCollection(
final TranslatedTopicWrapper translatedTopic) {
return getWrapperFactory().createCollection(new ArrayList(), TranslatedTopicString.class, false);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy