r1443 - in topia/trunk/topia-persistence: . src/main/java/org/codelutin/topia/persistence
Author: tchemit Date: 2009-05-04 16:56:36 +0000 (Mon, 04 May 2009) New Revision: 1443 Removed: topia/trunk/topia-persistence/src/main/java/org/codelutin/topia/persistence/TopiaEntityEnumEntry.java Modified: topia/trunk/topia-persistence/changelog.txt topia/trunk/topia-persistence/src/main/java/org/codelutin/topia/persistence/TopiaEntityAbstract.java Log: remove TopiaEntityEnumEntry use @Override in TopiaEntityAbstract Modified: topia/trunk/topia-persistence/changelog.txt =================================================================== --- topia/trunk/topia-persistence/changelog.txt 2009-05-04 12:11:36 UTC (rev 1442) +++ topia/trunk/topia-persistence/changelog.txt 2009-05-04 16:56:36 UTC (rev 1443) @@ -1,3 +1,8 @@ +2.1.5 + +* 20090504 [chemit] - suppress deprecated class TopiaEntityEnumEntry + - improve TopiaEntityAbstract (fix javadoc, add @Override) + 2.1.4 xxxx 200903xx * 20090418 [chemit] - suppress deprecated generators - add a BeanGenerator Modified: topia/trunk/topia-persistence/src/main/java/org/codelutin/topia/persistence/TopiaEntityAbstract.java =================================================================== --- topia/trunk/topia-persistence/src/main/java/org/codelutin/topia/persistence/TopiaEntityAbstract.java 2009-05-04 12:11:36 UTC (rev 1442) +++ topia/trunk/topia-persistence/src/main/java/org/codelutin/topia/persistence/TopiaEntityAbstract.java 2009-05-04 16:56:36 UTC (rev 1443) @@ -73,38 +73,42 @@ transient protected PropertyChangeSupport writeListeners = new PropertyChangeSupport( this); - /** + /* * (non-Javadoc) * * @see org.codelutin.topia.persistence.TopiaEntity#getTopiaId() */ + @Override public String getTopiaId() { return topiaId; } - /** + /* * (non-Javadoc) * * @see org.codelutin.topia.persistence.TopiaEntity#setTopiaId(String) */ + @Override public void setTopiaId(String v) { this.topiaId = v; } - /** + /* * (non-Javadoc) * * @see org.codelutin.topia.persistence.TopiaEntity#getTopiaVersion() */ + @Override public long getTopiaVersion() { return topiaVersion; } - /** + /* * (non-Javadoc) * * @see org.codelutin.topia.persistence.TopiaEntity#setTopiaVersion(long) */ + @Override public void setTopiaVersion(long v) { this.topiaVersion = v; } @@ -114,6 +118,7 @@ * * @see org.codelutin.topia.persistence.TopiaEntity#getTopiaCreateTime() */ + @Override public Date getTopiaCreateDate() { return topiaCreateDate; } @@ -123,21 +128,24 @@ * * @see org.codelutin.topia.persistence.TopiaEntity#setTopiaCreateTime(java.util.Date) */ + @Override public void setTopiaCreateDate(Date topiaCreateDate) { this.topiaCreateDate = topiaCreateDate; } - /** + /* * (non-Javadoc) * * @see org.codelutin.topia.persistence.TopiaEntity#getTopiaContext() */ + @Override public TopiaContext getTopiaContext() { return topiaContext; } /** * @param context The context to set. + * @throws TopiaException if any pb ? */ public void setTopiaContext(TopiaContext context) throws TopiaException { if (this.topiaContext == null) { @@ -147,6 +155,7 @@ } } + @Override public void postCreate() throws TopiaException { // do nothing by default } @@ -156,6 +165,7 @@ * * @see org.codelutin.topia.persistence.TopiaEntity#update() */ + @Override public void update() throws TopiaException { throw new UnsupportedOperationException(); } @@ -165,6 +175,7 @@ * * @see org.codelutin.topia.persistence.TopiaEntity#delete() */ + @Override public void delete() throws TopiaException { throw new UnsupportedOperationException(); } @@ -172,6 +183,7 @@ /* (non-Javadoc) * @see org.codelutin.topia.persistence.TopiaEntity#getComposite() */ + @Override public List<TopiaEntity> getComposite() throws TopiaException { throw new UnsupportedOperationException(); } @@ -179,6 +191,7 @@ /* (non-Javadoc) * @see org.codelutin.topia.persistence.TopiaEntity#getAggregate() */ + @Override public List<TopiaEntity> getAggregate() throws TopiaException { throw new UnsupportedOperationException(); } @@ -267,74 +280,90 @@ } } + @Override public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener) { writeListeners.addPropertyChangeListener(propertyName, listener); } + @Override public void addPropertyChangeListener(PropertyChangeListener listener) { writeListeners.addPropertyChangeListener(listener); } + @Override public void addVetoableChangeListener(String propertyName, VetoableChangeListener vetoable) { writeVetoables.addVetoableChangeListener(propertyName, vetoable); } + @Override public void addVetoableChangeListener(VetoableChangeListener vetoable) { writeVetoables.addVetoableChangeListener(vetoable); } + @Override public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener) { writeListeners.removePropertyChangeListener(propertyName, listener); } + @Override public void removePropertyChangeListener(PropertyChangeListener listener) { writeListeners.removePropertyChangeListener(listener); } + @Override public void removeVetoableChangeListener(String propertyName, VetoableChangeListener vetoable) { writeVetoables.removeVetoableChangeListener(propertyName, vetoable); } + @Override public void removeVetoableChangeListener(VetoableChangeListener vetoable) { writeVetoables.removeVetoableChangeListener(vetoable); } + @Override public void addPropertyListener(String propertyName, PropertyChangeListener listener) { readListeners.addPropertyChangeListener(propertyName, listener); } + @Override public void addPropertyListener(PropertyChangeListener listener) { readListeners.addPropertyChangeListener(listener); } + @Override public void addVetoableListener(String propertyName, VetoableChangeListener vetoable) { readVetoables.addVetoableChangeListener(propertyName, vetoable); } + @Override public void addVetoableListener(VetoableChangeListener vetoable) { readVetoables.addVetoableChangeListener(vetoable); } + @Override public void removePropertyListener(String propertyName, PropertyChangeListener listener) { readListeners.removePropertyChangeListener(propertyName, listener); } + @Override public void removePropertyListener(PropertyChangeListener listener) { readListeners.removePropertyChangeListener(listener); } + @Override public void removeVetoableListener(String propertyName, VetoableChangeListener vetoable) { readVetoables.removeVetoableChangeListener(propertyName, vetoable); } + @Override public void removeVetoableListener(VetoableChangeListener vetoable) { readVetoables.removeVetoableChangeListener(vetoable); } Deleted: topia/trunk/topia-persistence/src/main/java/org/codelutin/topia/persistence/TopiaEntityEnumEntry.java =================================================================== --- topia/trunk/topia-persistence/src/main/java/org/codelutin/topia/persistence/TopiaEntityEnumEntry.java 2009-05-04 12:11:36 UTC (rev 1442) +++ topia/trunk/topia-persistence/src/main/java/org/codelutin/topia/persistence/TopiaEntityEnumEntry.java 2009-05-04 16:56:36 UTC (rev 1443) @@ -1,178 +0,0 @@ -package org.codelutin.topia.persistence; - -import org.codelutin.topia.TopiaContext; -import org.codelutin.topia.TopiaException; -import org.codelutin.topia.framework.TopiaContextImplementor; - -import java.util.Collection; -import java.util.List; -import java.util.Map; - -/** - * @deprecated This class is used in deprecated generator {@link org.codelutin.topia.generator.EntityEnumGenerator} - * - * @author chemit */ -@Deprecated -public class TopiaEntityEnumEntry<T extends TopiaEntity> implements - java.io.Serializable { - - /** the contract class of the entity's type. */ - protected Class<T> contractClass; - - /** the concrete implementation class of the entity's type. */ - protected Class<T> implementationClass; - - private static final long serialVersionUID = 1L; - - public TopiaEntityEnumEntry(Class<T> contractClass) { - this.contractClass = contractClass; - } - - public Class<T> getContractClass() { - return contractClass; - } - - @SuppressWarnings({"unchecked"}) - public Class<T> getImplementationClass() { - if (implementationClass == null) { - try { - implementationClass = (Class<T>) Class.forName(contractClass - .getName() - + "Impl"); - } catch (ClassNotFoundException e) { - throw new IllegalArgumentException( - "could not find implementation for entity contract " - + contractClass); - } - } - return implementationClass; - } - - public TopiaDAO<T> getDAO(TopiaContext ctxt) throws TopiaException { - TopiaContextImplementor ci = (TopiaContextImplementor) ctxt; - return ci.getDAO(contractClass); - } - - public T create(TopiaContext ctxt) throws TopiaException { - TopiaDAO<T> dao = getDAO(ctxt); - return dao.create(); - } - - public T create(TopiaContext ctxt, Object... properties) - throws TopiaException { - TopiaDAO<T> dao = getDAO(ctxt); - return dao.create(properties); - } - - public T create(TopiaContext ctxt, Map<String, Object> properties) - throws TopiaException { - TopiaDAO<T> dao = getDAO(ctxt); - return dao.create(properties); - } - - public T update(T entity, TopiaContext ctxt) throws TopiaException { - TopiaDAO<T> dao = getDAO(ctxt); - return dao.update(entity); - } - - public void delete(T entity, TopiaContext ctxt) throws TopiaException { - TopiaDAO<T> dao = getDAO(ctxt); - dao.delete(entity); - } - - public int size(TopiaContext ctxt) throws TopiaException { - TopiaDAO<T> dao = getDAO(ctxt); - return dao.size(); - } - - public List<T> findAll(TopiaContext ctxt) throws TopiaException { - TopiaDAO<T> dao = getDAO(ctxt); - return dao.findAll(); - } - - public List<T> findAllWithOrder(TopiaContext ctxt, String... propertyNames) - throws TopiaException { - TopiaDAO<T> dao = getDAO(ctxt); - return dao.findAllWithOrder(propertyNames); - } - - public T findByTopiaId(String topiaId, TopiaContext ctxt) - throws TopiaException { - TopiaDAO<T> dao = getDAO(ctxt); - return dao.findByTopiaId(topiaId); - } - - public T findByPrimaryKey(TopiaContext ctxt, Map<String, Object> keys) - throws TopiaException { - TopiaDAO<T> dao = getDAO(ctxt); - return dao.findByPrimaryKey(keys); - } - - public T findByPrimaryKey(TopiaContext ctxt, Object... k) - throws TopiaException { - TopiaDAO<T> dao = getDAO(ctxt); - return dao.findByPrimaryKey(k); - } - - public T findByProperty(TopiaContext ctxt, String propertyName, Object value) - throws TopiaException { - TopiaDAO<T> dao = getDAO(ctxt); - return dao.findByProperty(propertyName, value); - } - - public T findByProperties(TopiaContext ctxt, String propertyName, - Object value, Object... others) throws TopiaException { - TopiaDAO<T> dao = getDAO(ctxt); - return dao.findByProperties(propertyName, value, others); - } - - public T findByProperties(TopiaContext ctxt, Map<String, Object> properties) - throws TopiaException { - TopiaDAO<T> dao = getDAO(ctxt); - return dao.findByProperties(properties); - } - - public List<T> findAllByProperty(TopiaContext ctxt, String propertyName, - Object value) throws TopiaException { - TopiaDAO<T> dao = getDAO(ctxt); - return dao.findAllByProperty(propertyName, value); - } - - public List<T> findAllByProperties(TopiaContext ctxt, String propertyName, - Object value, Object... others) throws TopiaException { - TopiaDAO<T> dao = getDAO(ctxt); - return dao.findAllByProperties(propertyName, value, others); - } - - public List<T> findAllByProperties(TopiaContext ctxt, - Map<String, Object> properties) throws TopiaException { - TopiaDAO<T> dao = getDAO(ctxt); - return dao.findAllByProperties(properties); - } - - public T findContainsProperties(TopiaContext ctxt, - Map<String, Collection> properties) throws TopiaException { - TopiaDAO<T> dao = getDAO(ctxt); - return dao.findContainsProperties(properties); - } - - public T findContainsProperties(TopiaContext ctxt, String propertyName, - Collection values, Object... others) throws TopiaException { - TopiaDAO<T> dao = getDAO(ctxt); - return dao.findContainsProperties(propertyName, values, others); - } - - public List<T> findAllContainsProperties(TopiaContext ctxt, - Map<String, Collection> properties) throws TopiaException { - TopiaDAO<T> dao = getDAO(ctxt); - return dao.findAllContainsProperties(properties); - } - - public List<T> findAllContainsProperties(TopiaContext ctxt, - String propertyName, Collection values, Object... others) - throws TopiaException { - TopiaDAO<T> dao = getDAO(ctxt); - return dao.findAllContainsProperties(propertyName, values, others); - } - -}
participants (1)
-
tchemit@users.labs.libre-entreprise.org