diff --git a/src/main/java/com/avaje/ebean/Transaction.java b/src/main/java/com/avaje/ebean/Transaction.java
index 9a8324297..1f281090d 100644
--- a/src/main/java/com/avaje/ebean/Transaction.java
+++ b/src/main/java/com/avaje/ebean/Transaction.java
@@ -17,25 +17,25 @@ public interface Transaction extends Closeable {
* Read Committed transaction isolation. Same as
* java.sql.Connection.TRANSACTION_READ_COMMITTED.
*/
- static final int READ_COMMITTED = java.sql.Connection.TRANSACTION_READ_COMMITTED;
+ int READ_COMMITTED = java.sql.Connection.TRANSACTION_READ_COMMITTED;
/**
* Read Uncommitted transaction isolation. Same as
* java.sql.Connection.TRANSACTION_READ_UNCOMMITTED.
*/
- static final int READ_UNCOMMITTED = java.sql.Connection.TRANSACTION_READ_UNCOMMITTED;
+ int READ_UNCOMMITTED = java.sql.Connection.TRANSACTION_READ_UNCOMMITTED;
/**
* Repeatable read transaction isolation. Same as
* java.sql.Connection.TRANSACTION_REPEATABLE_READ.
*/
- static final int REPEATABLE_READ = java.sql.Connection.TRANSACTION_REPEATABLE_READ;
+ int REPEATABLE_READ = java.sql.Connection.TRANSACTION_REPEATABLE_READ;
/**
* Serializable transaction isolation. Same as
* java.sql.Connection.TRANSACTION_SERIALIZABLE.
*/
- static final int SERIALIZABLE = java.sql.Connection.TRANSACTION_SERIALIZABLE;
+ int SERIALIZABLE = java.sql.Connection.TRANSACTION_SERIALIZABLE;
/**
* Register a TransactionCallback with this transaction.
diff --git a/src/main/java/com/avaje/ebean/bean/BeanCollection.java b/src/main/java/com/avaje/ebean/bean/BeanCollection.java
index 811d5b57f..a421dc5f5 100644
--- a/src/main/java/com/avaje/ebean/bean/BeanCollection.java
+++ b/src/main/java/com/avaje/ebean/bean/BeanCollection.java
@@ -22,7 +22,7 @@ import com.avaje.ebean.ExpressionList;
*/
public interface BeanCollection extends Serializable {
- public enum ModifyListenMode {
+ enum ModifyListenMode {
/** The common mode */
NONE,
/** Mode used for PrivateOwned */
@@ -36,23 +36,23 @@ public interface BeanCollection extends Serializable {
*
* This is done as part of bean refresh.
*/
- public void reset(EntityBean ownerBean, String propertyName);
+ void reset(EntityBean ownerBean, String propertyName);
/**
* Return true if the collection is empty and untouched. Used to detect if a
* collection was 'cleared' deliberately or just un-initialised.
*/
- public boolean isEmptyAndUntouched();
+ boolean isEmptyAndUntouched();
/**
* Return the bean that owns this collection.
*/
- public EntityBean getOwnerBean();
+ EntityBean getOwnerBean();
/**
* Return the bean property name this collection represents.
*/
- public String getPropertyName();
+ String getPropertyName();
/**
* Check after the lazy load that the underlying collection is not null
@@ -62,7 +62,7 @@ public interface BeanCollection extends Serializable {
* then make sure the collection is set to empty.
*
*/
- public boolean checkEmptyLazyLoad();
+ boolean checkEmptyLazyLoad();
/**
* Return the filter (if any) that was used in building this collection.
@@ -70,22 +70,22 @@ public interface BeanCollection extends Serializable {
* This is so that the filter can be applied on refresh.
*
*/
- public ExpressionList> getFilterMany();
+ ExpressionList> getFilterMany();
/**
* Set the filter that was used in building this collection.
*/
- public void setFilterMany(ExpressionList> filterMany);
+ void setFilterMany(ExpressionList> filterMany);
/**
* Set a listener to be notified when the BeanCollection is first touched.
*/
- public void setBeanCollectionTouched(BeanCollectionTouched notify);
+ void setBeanCollectionTouched(BeanCollectionTouched notify);
/**
* Return true if the collection has been registered with the batch loading context.
*/
- public boolean isRegisteredWithLoadContext();
+ boolean isRegisteredWithLoadContext();
/**
* Set the loader that will be used to lazy/query load this collection.
@@ -93,19 +93,19 @@ public interface BeanCollection extends Serializable {
* This is effectively the batch loading context this collection is registered with.
*
*/
- public void setLoader(BeanCollectionLoader beanLoader);
+ void setLoader(BeanCollectionLoader beanLoader);
/**
* Set to true if you want the BeanCollection to be treated as read only. This
* means no elements can be added or removed etc.
*/
- public void setReadOnly(boolean readOnly);
+ void setReadOnly(boolean readOnly);
/**
* Return true if the collection should be treated as readOnly and no elements
* can be added or removed etc.
*/
- public boolean isReadOnly();
+ boolean isReadOnly();
/**
* Add the bean to the collection.
@@ -113,22 +113,22 @@ public interface BeanCollection extends Serializable {
* This is disallowed for BeanMap.
*
*/
- public void internalAdd(Object bean);
+ void internalAdd(Object bean);
/**
* Return the number of elements in the List Set or Map.
*/
- public int size();
+ int size();
/**
* Return true if the List Set or Map is empty.
*/
- public boolean isEmpty();
+ boolean isEmpty();
/**
* Returns the underlying collection of beans from the Set, Map or List.
*/
- public Collection getActualDetails();
+ Collection getActualDetails();
/**
* Returns the underlying entries so for Maps this is a collection of
@@ -137,20 +137,20 @@ public interface BeanCollection extends Serializable {
* For maps this returns the entrySet as we need the keys of the map.
*
*/
- public Collection> getActualEntries();
+ Collection> getActualEntries();
/**
* return true if there are real rows held. Return false is this is using
* Deferred fetch to lazy load the rows and the rows have not yet been
* fetched.
*/
- public boolean isPopulated();
+ boolean isPopulated();
/**
* Return true if this is a reference (lazy loading) bean collection. This is
* the same as !isPopulated();
*/
- public boolean isReference();
+ boolean isReference();
/**
* Set modify listening on or off. This is used to keep track of objects that
@@ -161,7 +161,7 @@ public interface BeanCollection extends Serializable {
* Otherwise modifyListening is false.
*
*/
- public void setModifyListening(ModifyListenMode modifyListenMode);
+ void setModifyListening(ModifyListenMode modifyListenMode);
/**
* Add an object to the additions list.
@@ -170,7 +170,7 @@ public interface BeanCollection extends Serializable {
* ManyToMany.
*
*/
- public void modifyAddition(E bean);
+ void modifyAddition(E bean);
/**
* Add an object to the deletions list.
@@ -179,23 +179,23 @@ public interface BeanCollection extends Serializable {
* ManyToMany.
*
*/
- public void modifyRemoval(Object bean);
+ void modifyRemoval(Object bean);
/**
* Return the list of objects added to the list set or map. These will used to
* insert rows into the intersection table of a ManyToMany.
*/
- public Set getModifyAdditions();
+ Set getModifyAdditions();
/**
* Return the list of objects removed from the list set or map. These will
* used to delete rows from the intersection table of a ManyToMany.
*/
- public Set getModifyRemovals();
+ Set getModifyRemovals();
/**
* Reset the set of additions and deletions. This is called after the
* additions and removals have been processed.
*/
- public void modifyReset();
+ void modifyReset();
}
diff --git a/src/main/java/com/avaje/ebean/bean/BeanCollectionAdd.java b/src/main/java/com/avaje/ebean/bean/BeanCollectionAdd.java
index 1df602fc8..adf321765 100644
--- a/src/main/java/com/avaje/ebean/bean/BeanCollectionAdd.java
+++ b/src/main/java/com/avaje/ebean/bean/BeanCollectionAdd.java
@@ -12,5 +12,5 @@ public interface BeanCollectionAdd {
/**
* Add a loaded bean to the collection.
*/
- public void addBean(EntityBean bean);
+ void addBean(EntityBean bean);
}
diff --git a/src/main/java/com/avaje/ebean/bean/BeanCollectionLoader.java b/src/main/java/com/avaje/ebean/bean/BeanCollectionLoader.java
index 8b8781d8a..25ee13860 100644
--- a/src/main/java/com/avaje/ebean/bean/BeanCollectionLoader.java
+++ b/src/main/java/com/avaje/ebean/bean/BeanCollectionLoader.java
@@ -11,11 +11,11 @@ public interface BeanCollectionLoader {
/**
* Return the name of the associated EbeanServer.
*/
- public String getName();
+ String getName();
/**
* Invoke the lazy loading for this bean collection.
*/
- public void loadMany(BeanCollection> collection, boolean onlyIds);
+ void loadMany(BeanCollection> collection, boolean onlyIds);
}
diff --git a/src/main/java/com/avaje/ebean/bean/BeanCollectionTouched.java b/src/main/java/com/avaje/ebean/bean/BeanCollectionTouched.java
index 2962e2206..694c5d574 100644
--- a/src/main/java/com/avaje/ebean/bean/BeanCollectionTouched.java
+++ b/src/main/java/com/avaje/ebean/bean/BeanCollectionTouched.java
@@ -16,5 +16,5 @@ public interface BeanCollectionTouched {
/**
* Notify the listener that the bean collection has been used.
*/
- public void notifyTouched(BeanCollection> c);
+ void notifyTouched(BeanCollection> c);
}
diff --git a/src/main/java/com/avaje/ebean/bean/BeanLoader.java b/src/main/java/com/avaje/ebean/bean/BeanLoader.java
index 6c169efa7..d74a7b681 100644
--- a/src/main/java/com/avaje/ebean/bean/BeanLoader.java
+++ b/src/main/java/com/avaje/ebean/bean/BeanLoader.java
@@ -11,11 +11,11 @@ public interface BeanLoader {
/**
* Return the name of the associated EbeanServer.
*/
- public String getName();
+ String getName();
/**
* Invoke the lazy loading for this bean.
*/
- public void loadBean(EntityBeanIntercept ebi);
+ void loadBean(EntityBeanIntercept ebi);
}
diff --git a/src/main/java/com/avaje/ebean/bean/EntityBean.java b/src/main/java/com/avaje/ebean/bean/EntityBean.java
index ea39333c8..4a077a038 100644
--- a/src/main/java/com/avaje/ebean/bean/EntityBean.java
+++ b/src/main/java/com/avaje/ebean/bean/EntityBean.java
@@ -14,9 +14,9 @@ import java.io.Serializable;
*/
public interface EntityBean extends Serializable {
- public String[] _ebean_getPropertyNames();
+ String[] _ebean_getPropertyNames();
- public String _ebean_getPropertyName(int pos);
+ String _ebean_getPropertyName(int pos);
/**
* Return the enhancement marker value.
@@ -25,38 +25,38 @@ public interface EntityBean extends Serializable {
* entity classes are enhanced (specifically not just a super class).
*
*/
- public String _ebean_getMarker();
+ String _ebean_getMarker();
/**
* Create and return a new entity bean instance.
*/
- public Object _ebean_newInstance();
+ Object _ebean_newInstance();
/**
* Add a PropertyChangeListener to this bean.
*/
- public void addPropertyChangeListener(PropertyChangeListener listener);
+ void addPropertyChangeListener(PropertyChangeListener listener);
/**
* Remove a PropertyChangeListener from this bean.
*/
- public void removePropertyChangeListener(PropertyChangeListener listener);
+ void removePropertyChangeListener(PropertyChangeListener listener);
/**
* Generated method that sets the loaded state on all the embedded beans on
* this entity bean by using EntityBeanIntercept.setEmbeddedLoaded(Object o);
*/
- public void _ebean_setEmbeddedLoaded();
+ void _ebean_setEmbeddedLoaded();
/**
* Return true if any embedded beans are new or dirty.
*/
- public boolean _ebean_isEmbeddedNewOrDirty();
+ boolean _ebean_isEmbeddedNewOrDirty();
/**
* Return the intercept for this object.
*/
- public EntityBeanIntercept _ebean_getIntercept();
+ EntityBeanIntercept _ebean_getIntercept();
/**
* Similar to _ebean_getIntercept() except it checks to see if the intercept
@@ -71,7 +71,7 @@ public interface EntityBean extends Serializable {
* frameworks that can't take into account our ebean fields.
*
*/
- public EntityBeanIntercept _ebean_intercept();
+ EntityBeanIntercept _ebean_intercept();
/**
* Create a copy of this entity bean.
@@ -81,7 +81,7 @@ public interface EntityBean extends Serializable {
* optimistic concurrency control.
*
*/
- public Object _ebean_createCopy();
+ Object _ebean_createCopy();
/**
* Set the value of a field of an entity bean of this type.
@@ -90,12 +90,12 @@ public interface EntityBean extends Serializable {
* on entity beans. That means lazy loading and oldValues creation.
*
*/
- public void _ebean_setField(int fieldIndex, Object value);
+ void _ebean_setField(int fieldIndex, Object value);
/**
* Set the field value with interception.
*/
- public void _ebean_setFieldIntercept(int fieldIndex, Object value);
+ void _ebean_setFieldIntercept(int fieldIndex, Object value);
/**
* Return the value of a field from an entity bean of this type.
@@ -104,11 +104,11 @@ public interface EntityBean extends Serializable {
* on entity beans. That means lazy loading.
*
*/
- public Object _ebean_getField(int fieldIndex);
+ Object _ebean_getField(int fieldIndex);
/**
* Return the field value with interception.
*/
- public Object _ebean_getFieldIntercept(int fieldIndex);
+ Object _ebean_getFieldIntercept(int fieldIndex);
}
diff --git a/src/main/java/com/avaje/ebean/bean/NodeUsageListener.java b/src/main/java/com/avaje/ebean/bean/NodeUsageListener.java
index ee705a073..5b8e7744a 100644
--- a/src/main/java/com/avaje/ebean/bean/NodeUsageListener.java
+++ b/src/main/java/com/avaje/ebean/bean/NodeUsageListener.java
@@ -12,5 +12,5 @@ public interface NodeUsageListener {
* This information is used by autoFetch to tune queries.
*
*/
- public void collectNodeUsage(NodeUsageCollector collector);
+ void collectNodeUsage(NodeUsageCollector collector);
}
diff --git a/src/main/java/com/avaje/ebean/bean/PersistenceContext.java b/src/main/java/com/avaje/ebean/bean/PersistenceContext.java
index f97d43419..df78875db 100644
--- a/src/main/java/com/avaje/ebean/bean/PersistenceContext.java
+++ b/src/main/java/com/avaje/ebean/bean/PersistenceContext.java
@@ -12,7 +12,7 @@ public interface PersistenceContext {
/**
* Put the entity bean into the PersistanceContext.
*/
- public void put(Object id, Object bean);
+ void put(Object id, Object bean);
/**
* Put the entity bean into the PersistanceContext if one is not already
@@ -22,44 +22,44 @@ public interface PersistenceContext {
* returns null.
*
*/
- public Object putIfAbsent(Object id, Object bean);
+ Object putIfAbsent(Object id, Object bean);
/**
* Return an object given its type and unique id.
*/
- public Object get(Class> beanType, Object uid);
+ Object get(Class> beanType, Object uid);
/**
* Get the bean from the persistence context also checked to see if it had
* been previously deleted (if so then you also can't hit the L2 cache to
* fetch the bean for this particular persistence context).
*/
- public WithOption getWithOption(Class> beanType, Object uid);
+ WithOption getWithOption(Class> beanType, Object uid);
/**
* Clear all the references.
*/
- public void clear();
+ void clear();
/**
* Clear all the references for a given type of entity bean.
*/
- public void clear(Class> beanType);
+ void clear(Class> beanType);
/**
* Clear the reference to a specific entity bean.
*/
- public void clear(Class> beanType, Object uid);
+ void clear(Class> beanType, Object uid);
/**
* Clear the reference as a result of an entity being deleted.
*/
- public void deleted(Class> beanType, Object id);
+ void deleted(Class> beanType, Object id);
/**
* Return the number of beans of the given type in the persistence context.
*/
- public int size(Class> beanType);
+ int size(Class> beanType);
/**
* Wrapper on a bean to also indicate if a bean has been deleted.
@@ -68,7 +68,7 @@ public interface PersistenceContext {
* not be able to be fetched from persistence context or L2 cache.
*
*/
- public static class WithOption {
+ class WithOption {
/**
* The bean was previously deleted from this persistence context (can't hit
diff --git a/src/main/java/com/avaje/ebean/cache/ServerCache.java b/src/main/java/com/avaje/ebean/cache/ServerCache.java
index 099e9122e..6efc6898a 100644
--- a/src/main/java/com/avaje/ebean/cache/ServerCache.java
+++ b/src/main/java/com/avaje/ebean/cache/ServerCache.java
@@ -26,38 +26,38 @@ public interface ServerCache {
* is made available for use.
*
*/
- public void init(EbeanServer ebeanServer);
+ void init(EbeanServer ebeanServer);
/**
* Return the configuration options for this cache.
*/
- public ServerCacheOptions getOptions();
+ ServerCacheOptions getOptions();
/**
* Update the configuration options for this cache.
*/
- public void setOptions(ServerCacheOptions options);
+ void setOptions(ServerCacheOptions options);
/**
* Return the value given the key.
*/
- public Object get(Object id);
+ Object get(Object id);
/**
* Put the value in the cache with a given id.
*/
- public Object put(Object id, Object value);
+ Object put(Object id, Object value);
/**
* Put the value in the cache but only if a matching value is not already in
* the cache.
*/
- public Object putIfAbsent(Object id, Object value);
+ Object putIfAbsent(Object id, Object value);
/**
* Remove a entry from the cache given its id.
*/
- public Object remove(Object id);
+ Object remove(Object id);
/**
* Clear all entries from the cache.
@@ -67,17 +67,17 @@ public interface ServerCache {
* be done via {@link ServerCacheManager#clear(Class)}.
*
*/
- public void clear();
+ void clear();
/**
* Return the number of entries in the cache.
*/
- public int size();
+ int size();
/**
* Return the hit ratio the cache is currently getting.
*/
- public int getHitRatio();
+ int getHitRatio();
/**
* Return statistics for the cache.
@@ -85,5 +85,5 @@ public interface ServerCache {
* @param reset
* if true the statistics are reset.
*/
- public ServerCacheStatistics getStatistics(boolean reset);
+ ServerCacheStatistics getStatistics(boolean reset);
}
diff --git a/src/main/java/com/avaje/ebean/cache/ServerCacheFactory.java b/src/main/java/com/avaje/ebean/cache/ServerCacheFactory.java
index 2b36081ac..a08f560da 100644
--- a/src/main/java/com/avaje/ebean/cache/ServerCacheFactory.java
+++ b/src/main/java/com/avaje/ebean/cache/ServerCacheFactory.java
@@ -16,11 +16,11 @@ public interface ServerCacheFactory {
* cache trimming/cleanup.
*
*/
- public void init(EbeanServer ebeanServer);
+ void init(EbeanServer ebeanServer);
/**
* Create the cache for the given type with options.
*/
- public ServerCache createCache(String cacheKey, ServerCacheOptions cacheOptions);
+ ServerCache createCache(String cacheKey, ServerCacheOptions cacheOptions);
}
diff --git a/src/main/java/com/avaje/ebean/cache/ServerCacheManager.java b/src/main/java/com/avaje/ebean/cache/ServerCacheManager.java
index 4767db886..5b9889971 100644
--- a/src/main/java/com/avaje/ebean/cache/ServerCacheManager.java
+++ b/src/main/java/com/avaje/ebean/cache/ServerCacheManager.java
@@ -16,40 +16,40 @@ public interface ServerCacheManager {
* background trimming of the cache.
*
*/
- public void init(EbeanServer server);
+ void init(EbeanServer server);
- public void setCaching(Class> beanType, boolean useCache);
+ void setCaching(Class> beanType, boolean useCache);
/**
* Return true if there is an active bean cache for this type of bean.
*/
- public boolean isBeanCaching(Class> beanType);
+ boolean isBeanCaching(Class> beanType);
/**
* Return the cache for mapping natural keys to id values.
*/
- public ServerCache getNaturalKeyCache(Class> beanType);
+ ServerCache getNaturalKeyCache(Class> beanType);
/**
* Return the cache for beans of a particular type.
*/
- public ServerCache getBeanCache(Class> beanType);
+ ServerCache getBeanCache(Class> beanType);
- public ServerCache getCollectionIdsCache(Class> beanType, String propertyName);
+ ServerCache getCollectionIdsCache(Class> beanType, String propertyName);
/**
* Return the cache for query results of a particular type of bean.
*/
- public ServerCache getQueryCache(Class> beanType);
+ ServerCache getQueryCache(Class> beanType);
/**
* This clears both the bean and query cache for a given type.
*/
- public void clear(Class> beanType);
+ void clear(Class> beanType);
/**
* Clear all the caches.
*/
- public void clearAll();
+ void clearAll();
}
diff --git a/src/main/java/com/avaje/ebean/config/CompoundType.java b/src/main/java/com/avaje/ebean/config/CompoundType.java
index 8d79a46f7..90b2cb716 100644
--- a/src/main/java/com/avaje/ebean/config/CompoundType.java
+++ b/src/main/java/com/avaje/ebean/config/CompoundType.java
@@ -37,10 +37,10 @@ public interface CompoundType {
/**
* Create an instance of the compound type given its property values.
*/
- public V create(Object[] propertyValues);
+ V create(Object[] propertyValues);
/**
* Return the properties in the order they appear in the constructor.
*/
- public CompoundTypeProperty[] getProperties();
+ CompoundTypeProperty[] getProperties();
}
diff --git a/src/main/java/com/avaje/ebean/config/CompoundTypeProperty.java b/src/main/java/com/avaje/ebean/config/CompoundTypeProperty.java
index 1874649a8..83823d664 100644
--- a/src/main/java/com/avaje/ebean/config/CompoundTypeProperty.java
+++ b/src/main/java/com/avaje/ebean/config/CompoundTypeProperty.java
@@ -23,7 +23,7 @@ public interface CompoundTypeProperty {
/**
* The name of this property.
*/
- public String getName();
+ String getName();
/**
* Return the property value from the containing compound value object.
@@ -32,7 +32,7 @@ public interface CompoundTypeProperty {
* the compound value object
* @return the property value.
*/
- public P getValue(V valueObject);
+ P getValue(V valueObject);
/**
* This should ONLY be used when the persistence type is different from
@@ -47,5 +47,5 @@ public interface CompoundTypeProperty {
* @return Return the java.sql.Type that you want to use to persist this
* property or 0 and Ebean will use the logical type.
*/
- public int getDbType();
+ int getDbType();
}
diff --git a/src/main/java/com/avaje/ebean/config/EncryptDeployManager.java b/src/main/java/com/avaje/ebean/config/EncryptDeployManager.java
index c7ca0d08d..99d6277f5 100644
--- a/src/main/java/com/avaje/ebean/config/EncryptDeployManager.java
+++ b/src/main/java/com/avaje/ebean/config/EncryptDeployManager.java
@@ -11,5 +11,5 @@ public interface EncryptDeployManager {
/**
* Return true if the table column is encrypted.
*/
- public EncryptDeploy getEncryptDeploy(TableName table, String column);
+ EncryptDeploy getEncryptDeploy(TableName table, String column);
}
diff --git a/src/main/java/com/avaje/ebean/config/EncryptKey.java b/src/main/java/com/avaje/ebean/config/EncryptKey.java
index 1d17eb2dc..999a95ed6 100644
--- a/src/main/java/com/avaje/ebean/config/EncryptKey.java
+++ b/src/main/java/com/avaje/ebean/config/EncryptKey.java
@@ -14,5 +14,5 @@ public interface EncryptKey {
/**
* Return the string key value.
*/
- public String getStringValue();
+ String getStringValue();
}
diff --git a/src/main/java/com/avaje/ebean/config/EncryptKeyManager.java b/src/main/java/com/avaje/ebean/config/EncryptKeyManager.java
index 615db8d6c..827b21167 100644
--- a/src/main/java/com/avaje/ebean/config/EncryptKeyManager.java
+++ b/src/main/java/com/avaje/ebean/config/EncryptKeyManager.java
@@ -13,11 +13,11 @@ public interface EncryptKeyManager {
* This gives the EncryptKeyManager the opportunity to get keys etc.
*
*/
- public void initialise();
+ void initialise();
/**
* Return the key used to encrypt and decrypt a property mapping to the given
* table and column.
*/
- public EncryptKey getEncryptKey(String tableName, String columnName);
+ EncryptKey getEncryptKey(String tableName, String columnName);
}
diff --git a/src/main/java/com/avaje/ebean/config/Encryptor.java b/src/main/java/com/avaje/ebean/config/Encryptor.java
index 44491860b..c482e71f9 100644
--- a/src/main/java/com/avaje/ebean/config/Encryptor.java
+++ b/src/main/java/com/avaje/ebean/config/Encryptor.java
@@ -14,21 +14,21 @@ public interface Encryptor {
/**
* Encrypt the data using the key.
*/
- public byte[] encrypt(byte[] data, EncryptKey key);
+ byte[] encrypt(byte[] data, EncryptKey key);
/**
* Decrypt the data using the key.
*/
- public byte[] decrypt(byte[] data, EncryptKey key);
+ byte[] decrypt(byte[] data, EncryptKey key);
/**
* Encrypt the formatted string value using a key.
*/
- public byte[] encryptString(String formattedValue, EncryptKey key);
+ byte[] encryptString(String formattedValue, EncryptKey key);
/**
* Decrypt the data returning a formatted string value using a key.
*/
- public String decryptString(byte[] data, EncryptKey key);
+ String decryptString(byte[] data, EncryptKey key);
}
diff --git a/src/main/java/com/avaje/ebean/config/ExternalTransactionManager.java b/src/main/java/com/avaje/ebean/config/ExternalTransactionManager.java
index 80f3ca02d..160928959 100644
--- a/src/main/java/com/avaje/ebean/config/ExternalTransactionManager.java
+++ b/src/main/java/com/avaje/ebean/config/ExternalTransactionManager.java
@@ -11,11 +11,11 @@ public interface ExternalTransactionManager {
* This will change when SPI is published but will do for now.
*
*/
- public void setTransactionManager(Object transactionManager);
+ void setTransactionManager(Object transactionManager);
/**
* Return the current transaction or null if there is none.
*/
- public Object getCurrentTransaction();
+ Object getCurrentTransaction();
}
diff --git a/src/main/java/com/avaje/ebean/config/NamingConvention.java b/src/main/java/com/avaje/ebean/config/NamingConvention.java
index 52b3a0341..34702c5e6 100644
--- a/src/main/java/com/avaje/ebean/config/NamingConvention.java
+++ b/src/main/java/com/avaje/ebean/config/NamingConvention.java
@@ -30,7 +30,7 @@ public interface NamingConvention {
* @param databasePlatform
* the database platform
*/
- public void setDatabasePlatform(DatabasePlatform databasePlatform);
+ void setDatabasePlatform(DatabasePlatform databasePlatform);
/**
* Returns the table name for a given Class.
@@ -45,7 +45,7 @@ public interface NamingConvention {
*
* @return the table name for the entity class
*/
- public TableName getTableName(Class> beanClass);
+ TableName getTableName(Class> beanClass);
/**
* Returns the ManyToMany join table name (aka the intersection table).
@@ -57,14 +57,14 @@ public interface NamingConvention {
*
* @return the many to many join table name
*/
- public TableName getM2MJoinTableName(TableName lhsTable, TableName rhsTable);
+ TableName getM2MJoinTableName(TableName lhsTable, TableName rhsTable);
/**
* Return the column name given the property name.
*
* @return the column name for a given property
*/
- public String getColumnFromProperty(Class> beanClass, String propertyName);
+ String getColumnFromProperty(Class> beanClass, String propertyName);
/**
* Return the property name from the column name.
@@ -79,7 +79,7 @@ public interface NamingConvention {
*
* @return the property name from the column name
*/
- public String getPropertyFromColumn(Class> beanClass, String dbColumnName);
+ String getPropertyFromColumn(Class> beanClass, String dbColumnName);
/**
* Return the sequence name given the table name (for DB's that use
@@ -93,7 +93,7 @@ public interface NamingConvention {
*
* @return the sequence name
*/
- public String getSequenceName(String tableName, String pkColumn);
+ String getSequenceName(String tableName, String pkColumn);
/**
* Return true if a prefix should be used building a foreign key name.
@@ -110,11 +110,11 @@ public interface NamingConvention {
* column names.
*
*/
- public boolean isUseForeignKeyPrefix();
+ boolean isUseForeignKeyPrefix();
/**
* Load setting from properties.
*/
- public void loadFromProperties(PropertiesWrapper properties);
+ void loadFromProperties(PropertiesWrapper properties);
}
\ No newline at end of file
diff --git a/src/main/java/com/avaje/ebean/config/PstmtDelegate.java b/src/main/java/com/avaje/ebean/config/PstmtDelegate.java
index fedc47714..c2407baca 100644
--- a/src/main/java/com/avaje/ebean/config/PstmtDelegate.java
+++ b/src/main/java/com/avaje/ebean/config/PstmtDelegate.java
@@ -20,5 +20,5 @@ public interface PstmtDelegate {
* the PreparedStatement coming out of the connection pool
* @return the underlying PreparedStatement
*/
- public PreparedStatement unwrap(PreparedStatement pstmt);
+ PreparedStatement unwrap(PreparedStatement pstmt);
}
diff --git a/src/main/java/com/avaje/ebean/config/ScalarTypeConverter.java b/src/main/java/com/avaje/ebean/config/ScalarTypeConverter.java
index 1e70c56e1..14a7f97aa 100644
--- a/src/main/java/com/avaje/ebean/config/ScalarTypeConverter.java
+++ b/src/main/java/com/avaje/ebean/config/ScalarTypeConverter.java
@@ -44,7 +44,7 @@ public interface ScalarTypeConverter {
* scala.Option and similar type converters this actually returns an instance
* representing "None".
*/
- public B getNullValue();
+ B getNullValue();
/**
* Convert the scalar type value into the value object.
@@ -56,7 +56,7 @@ public interface ScalarTypeConverter {
* @param scalarType
* the value from the data source
*/
- public B wrapValue(S scalarType);
+ B wrapValue(S scalarType);
/**
* Convert the value object into a scalar value that Ebean knows how to
@@ -69,6 +69,6 @@ public interface ScalarTypeConverter {
* @param beanType
* the value object
*/
- public S unwrapValue(B beanType);
+ S unwrapValue(B beanType);
}
diff --git a/src/main/java/com/avaje/ebean/config/UnderscoreNamingConvention.java b/src/main/java/com/avaje/ebean/config/UnderscoreNamingConvention.java
index 1ccb78c6b..3b1e65c68 100644
--- a/src/main/java/com/avaje/ebean/config/UnderscoreNamingConvention.java
+++ b/src/main/java/com/avaje/ebean/config/UnderscoreNamingConvention.java
@@ -1,172 +1,172 @@
-package com.avaje.ebean.config;
-
-/**
- * Converts between Camel Case and Underscore based names for both table and
- * column names (and is the default naming convention in Ebean).
- *
- * @author emcgreal
- * @author rbygrave
- */
-public class UnderscoreNamingConvention extends AbstractNamingConvention {
-
- /** Force toUnderscore to return in upper case. */
- private boolean forceUpperCase = false;
-
- /** The digits compressed. */
- private boolean digitsCompressed = true;
-
- /**
- * Create with a given sequence format.
- *
- * @param sequenceFormat
- * the sequence format
- */
- public UnderscoreNamingConvention(String sequenceFormat) {
- super(sequenceFormat);
- }
-
- /**
- * Create with a sequence format of "{table}_seq".
- */
- public UnderscoreNamingConvention() {
- super();
- }
-
- /**
- * Returns the last part of the class name.
- *
- * @param beanClass
- * the bean class
- *
- * @return the table name from class
- */
- public TableName getTableNameByConvention(Class> beanClass) {
-
- return new TableName(getCatalog(),
- getSchema(),
- toUnderscoreFromCamel(beanClass.getSimpleName()));
- }
-
- /**
- * Converts Camel case property name to underscore based column name.
- *
- * @return the column from property
- */
- public String getColumnFromProperty(Class> beanClass, String propertyName) {// Field
- // field)
- // {
-
- return toUnderscoreFromCamel(propertyName);
- }
-
- /**
- * Converts underscore based column name to Camel case property name.
- *
- * @param beanClass
- * the bean class
- * @param dbColumnName
- * the db column name
- *
- * @return the property from column
- */
- public String getPropertyFromColumn(Class> beanClass, String dbColumnName) {
- return toCamelFromUnderscore(dbColumnName);
- }
-
- /**
- * Return true if the result will be upper case.
- *
- * False if it will be lower case.
- *
- */
- public boolean isForceUpperCase() {
- return forceUpperCase;
- }
-
- /**
- * Set to true to make the result upper case.
- */
- public void setForceUpperCase(boolean forceUpperCase) {
- this.forceUpperCase = forceUpperCase;
- }
-
- /**
- * Returns true if digits are compressed.
- */
- public boolean isDigitsCompressed() {
- return digitsCompressed;
- }
-
- /**
- * Sets to true for digits to be compressed (without a leading underscore).
- */
- public void setDigitsCompressed(boolean digitsCompressed) {
- this.digitsCompressed = digitsCompressed;
- }
-
- /**
- * Convert and return the string to underscore from camel case.
- */
- protected String toUnderscoreFromCamel(String camelCase) {
-
- int lastUpper = -1;
- StringBuffer sb = new StringBuffer();
- for (int i = 0; i < camelCase.length(); i++) {
- char c = camelCase.charAt(i);
-
- if ('_' == c) {
- // Underscores should just be passed through
- sb.append(c);
- lastUpper = i;
- } else if (Character.isDigit(c)) {
- if (i > lastUpper + 1 && !digitsCompressed) {
- sb.append("_");
- }
- sb.append(c);
- lastUpper = i;
-
- } else if (Character.isUpperCase(c)) {
- if (i > lastUpper + 1) {
- sb.append("_");
- }
- sb.append(Character.toLowerCase(c));
- lastUpper = i;
-
- } else {
- sb.append(c);
- }
- }
- String ret = sb.toString();
- if (forceUpperCase) {
- ret = ret.toUpperCase();
- }
- return ret;
- }
-
- /**
- * To camel from underscore.
- *
- * @param underscore
- * the underscore
- *
- * @return the string
- */
- protected String toCamelFromUnderscore(String underscore) {
-
- StringBuffer result = new StringBuffer();
- String[] vals = underscore.split("_");
-
- for (int i = 0; i < vals.length; i++) {
- String lower = vals[i].toLowerCase();
- if (i > 0) {
- char c = Character.toUpperCase(lower.charAt(0));
- result.append(c);
- result.append(lower.substring(1));
- } else {
- result.append(lower);
- }
- }
-
- return result.toString();
- }
-}
+package com.avaje.ebean.config;
+
+/**
+ * Converts between Camel Case and Underscore based names for both table and
+ * column names (and is the default naming convention in Ebean).
+ *
+ * @author emcgreal
+ * @author rbygrave
+ */
+public class UnderscoreNamingConvention extends AbstractNamingConvention {
+
+ /** Force toUnderscore to return in upper case. */
+ private boolean forceUpperCase = false;
+
+ /** The digits compressed. */
+ private boolean digitsCompressed = true;
+
+ /**
+ * Create with a given sequence format.
+ *
+ * @param sequenceFormat
+ * the sequence format
+ */
+ public UnderscoreNamingConvention(String sequenceFormat) {
+ super(sequenceFormat);
+ }
+
+ /**
+ * Create with a sequence format of "{table}_seq".
+ */
+ public UnderscoreNamingConvention() {
+ super();
+ }
+
+ /**
+ * Returns the last part of the class name.
+ *
+ * @param beanClass
+ * the bean class
+ *
+ * @return the table name from class
+ */
+ public TableName getTableNameByConvention(Class> beanClass) {
+
+ return new TableName(getCatalog(),
+ getSchema(),
+ toUnderscoreFromCamel(beanClass.getSimpleName()));
+ }
+
+ /**
+ * Converts Camel case property name to underscore based column name.
+ *
+ * @return the column from property
+ */
+ public String getColumnFromProperty(Class> beanClass, String propertyName) {// Field
+ // field)
+ // {
+
+ return toUnderscoreFromCamel(propertyName);
+ }
+
+ /**
+ * Converts underscore based column name to Camel case property name.
+ *
+ * @param beanClass
+ * the bean class
+ * @param dbColumnName
+ * the db column name
+ *
+ * @return the property from column
+ */
+ public String getPropertyFromColumn(Class> beanClass, String dbColumnName) {
+ return toCamelFromUnderscore(dbColumnName);
+ }
+
+ /**
+ * Return true if the result will be upper case.
+ *
+ * False if it will be lower case.
+ *
+ */
+ public boolean isForceUpperCase() {
+ return forceUpperCase;
+ }
+
+ /**
+ * Set to true to make the result upper case.
+ */
+ public void setForceUpperCase(boolean forceUpperCase) {
+ this.forceUpperCase = forceUpperCase;
+ }
+
+ /**
+ * Returns true if digits are compressed.
+ */
+ public boolean isDigitsCompressed() {
+ return digitsCompressed;
+ }
+
+ /**
+ * Sets to true for digits to be compressed (without a leading underscore).
+ */
+ public void setDigitsCompressed(boolean digitsCompressed) {
+ this.digitsCompressed = digitsCompressed;
+ }
+
+ /**
+ * Convert and return the string to underscore from camel case.
+ */
+ protected String toUnderscoreFromCamel(String camelCase) {
+
+ int lastUpper = -1;
+ StringBuffer sb = new StringBuffer();
+ for (int i = 0; i < camelCase.length(); i++) {
+ char c = camelCase.charAt(i);
+
+ if ('_' == c) {
+ // Underscores should just be passed through
+ sb.append(c);
+ lastUpper = i;
+ } else if (Character.isDigit(c)) {
+ if (i > lastUpper + 1 && !digitsCompressed) {
+ sb.append("_");
+ }
+ sb.append(c);
+ lastUpper = i;
+
+ } else if (Character.isUpperCase(c)) {
+ if (i > lastUpper + 1) {
+ sb.append("_");
+ }
+ sb.append(Character.toLowerCase(c));
+ lastUpper = i;
+
+ } else {
+ sb.append(c);
+ }
+ }
+ String ret = sb.toString();
+ if (forceUpperCase) {
+ ret = ret.toUpperCase();
+ }
+ return ret;
+ }
+
+ /**
+ * To camel from underscore.
+ *
+ * @param underscore
+ * the underscore
+ *
+ * @return the string
+ */
+ protected String toCamelFromUnderscore(String underscore) {
+
+ StringBuffer result = new StringBuffer();
+ String[] vals = underscore.split("_");
+
+ for (int i = 0; i < vals.length; i++) {
+ String lower = vals[i].toLowerCase();
+ if (i > 0) {
+ char c = Character.toUpperCase(lower.charAt(0));
+ result.append(c);
+ result.append(lower.substring(1));
+ } else {
+ result.append(lower);
+ }
+ }
+
+ return result.toString();
+ }
+}
diff --git a/src/main/java/com/avaje/ebean/config/dbplatform/DbEncrypt.java b/src/main/java/com/avaje/ebean/config/dbplatform/DbEncrypt.java
index ae2ed8792..ac2295151 100644
--- a/src/main/java/com/avaje/ebean/config/dbplatform/DbEncrypt.java
+++ b/src/main/java/com/avaje/ebean/config/dbplatform/DbEncrypt.java
@@ -16,15 +16,15 @@ public interface DbEncrypt {
// /**
// * Return the SQL for decrypting a column returning a VARCHAR.
// */
- // public String getDecryptSql(String columnWithTableAlias);
+ // String getDecryptSql(String columnWithTableAlias);
//
// /**
// * Return the DB function with bind variables used to encrypt a VARCHAR
// * value.
// */
- // public String getEncryptBindSql();
+ // String getEncryptBindSql();
- public DbEncryptFunction getDbEncryptFunction(int jdbcType);
+ DbEncryptFunction getDbEncryptFunction(int jdbcType);
/**
* Return the DB type that encrypted Strings are stored in.
@@ -32,10 +32,10 @@ public interface DbEncrypt {
* This is VARCHAR for MySql and VARBINARY for most others.
*
*/
- public int getEncryptDbType();
+ int getEncryptDbType();
/**
* Return true if the DB encrypt function binds the data before the key.
*/
- public boolean isBindEncryptDataFirst();
+ boolean isBindEncryptDataFirst();
}
\ No newline at end of file
diff --git a/src/main/java/com/avaje/ebean/config/dbplatform/DbEncryptFunction.java b/src/main/java/com/avaje/ebean/config/dbplatform/DbEncryptFunction.java
index 4955633e1..d97972ab6 100644
--- a/src/main/java/com/avaje/ebean/config/dbplatform/DbEncryptFunction.java
+++ b/src/main/java/com/avaje/ebean/config/dbplatform/DbEncryptFunction.java
@@ -5,11 +5,11 @@ public interface DbEncryptFunction {
/**
* Return the SQL for decrypting a column returning a VARCHAR.
*/
- public String getDecryptSql(String columnWithTableAlias);
+ String getDecryptSql(String columnWithTableAlias);
/**
* Return the DB function with bind variables used to encrypt a VARCHAR value.
*/
- public String getEncryptBindSql();
+ String getEncryptBindSql();
}
diff --git a/src/main/java/com/avaje/ebean/config/dbplatform/IdGenerator.java b/src/main/java/com/avaje/ebean/config/dbplatform/IdGenerator.java
index f366d89aa..32722f6f2 100644
--- a/src/main/java/com/avaje/ebean/config/dbplatform/IdGenerator.java
+++ b/src/main/java/com/avaje/ebean/config/dbplatform/IdGenerator.java
@@ -16,18 +16,18 @@ public interface IdGenerator {
/**
* The name of the default UUID generator.
*/
- public static final String AUTO_UUID = "auto.uuid";
+ static final String AUTO_UUID = "auto.uuid";
/**
* Return the name of the IdGenerator. For sequences this is the sequence
* name.
*/
- public String getName();
+ String getName();
/**
* Return true if this is a DB sequence.
*/
- public boolean isDbSequence();
+ boolean isDbSequence();
/**
* return the next unique identity value.
@@ -35,7 +35,7 @@ public interface IdGenerator {
* Note the transaction passed in can be null.
*
*/
- public Object nextId(Transaction transaction);
+ Object nextId(Transaction transaction);
/**
* Is called prior to inserting OneToMany's as an indication that a number of
@@ -45,6 +45,6 @@ public interface IdGenerator {
* Especially when the allocateSize is very large.
*
*/
- public void preAllocateIds(int allocateSize);
+ void preAllocateIds(int allocateSize);
}
diff --git a/src/main/java/com/avaje/ebean/config/dbplatform/SqlLimitRequest.java b/src/main/java/com/avaje/ebean/config/dbplatform/SqlLimitRequest.java
index a97d972f1..d8d8d1f49 100644
--- a/src/main/java/com/avaje/ebean/config/dbplatform/SqlLimitRequest.java
+++ b/src/main/java/com/avaje/ebean/config/dbplatform/SqlLimitRequest.java
@@ -11,35 +11,35 @@ public interface SqlLimitRequest {
/**
* Return true if the query uses distinct.
*/
- public boolean isDistinct();
+ boolean isDistinct();
/**
* Return the first row value.
*/
- public int getFirstRow();
+ int getFirstRow();
/**
* Return the max rows for this query.
*/
- public int getMaxRows();
+ int getMaxRows();
/**
* Return the sql query.
*/
- public String getDbSql();
+ String getDbSql();
/**
* Return the orderBy clause of the sql query.
*/
- public String getDbOrderBy();
+ String getDbOrderBy();
/**
* return the query
*/
- public Query> getOrmQuery();
+ Query> getOrmQuery();
/**
* return the database platform
*/
- public DatabasePlatform getDbPlatform();
+ DatabasePlatform getDbPlatform();
}
diff --git a/src/main/java/com/avaje/ebean/config/dbplatform/SqlLimiter.java b/src/main/java/com/avaje/ebean/config/dbplatform/SqlLimiter.java
index 8a14daeb9..16faeada7 100644
--- a/src/main/java/com/avaje/ebean/config/dbplatform/SqlLimiter.java
+++ b/src/main/java/com/avaje/ebean/config/dbplatform/SqlLimiter.java
@@ -11,15 +11,15 @@ public interface SqlLimiter {
* Note that this is removed for logging sql to the transaction log.
*
*/
- public static final char NEW_LINE = '\n';
+ static final char NEW_LINE = '\n';
/**
* The carriage return character.
*/
- public static final char CARRIAGE_RETURN = '\r';
+ static final char CARRIAGE_RETURN = '\r';
/**
* Add the SQL limiting statements around the query.
*/
- public SqlLimitResponse limit(SqlLimitRequest request);
+ SqlLimitResponse limit(SqlLimitRequest request);
}
diff --git a/src/main/java/com/avaje/ebean/event/BeanFinder.java b/src/main/java/com/avaje/ebean/event/BeanFinder.java
index 356461db6..e8357b7b7 100644
--- a/src/main/java/com/avaje/ebean/event/BeanFinder.java
+++ b/src/main/java/com/avaje/ebean/event/BeanFinder.java
@@ -20,7 +20,7 @@ public interface BeanFinder {
/**
* Find a bean using its id or unique predicate.
*/
- public T find(BeanQueryRequest request);
+ T find(BeanQueryRequest request);
/**
* Return a List, Set or Map for the given find request.
@@ -29,6 +29,6 @@ public interface BeanFinder {
* get the return type right.
*
*/
- public BeanCollection findMany(BeanQueryRequest request);
+ BeanCollection findMany(BeanQueryRequest request);
}
diff --git a/src/main/java/com/avaje/ebean/event/BeanPersistController.java b/src/main/java/com/avaje/ebean/event/BeanPersistController.java
index 4bfd7700d..16bb86f90 100644
--- a/src/main/java/com/avaje/ebean/event/BeanPersistController.java
+++ b/src/main/java/com/avaje/ebean/event/BeanPersistController.java
@@ -53,13 +53,13 @@ public interface BeanPersistController {
* @return an int used to control the order BeanPersistController's are
* executed
*/
- public int getExecutionOrder();
+ int getExecutionOrder();
/**
* Return true if this BeanPersistController should be registered for events
* on this entity type.
*/
- public boolean isRegisterFor(Class> cls);
+ boolean isRegisterFor(Class> cls);
/**
* Prior to the insert perform some action. Return true if you want the
@@ -69,7 +69,7 @@ public interface BeanPersistController {
* do not want the default insert to be performed.
*
*/
- public boolean preInsert(BeanPersistRequest> request);
+ boolean preInsert(BeanPersistRequest> request);
/**
* Prior to the update perform some action. Return true if you want the
@@ -79,7 +79,7 @@ public interface BeanPersistController {
* do not want the default update to be performed.
*
*/
- public boolean preUpdate(BeanPersistRequest> request);
+ boolean preUpdate(BeanPersistRequest> request);
/**
* Prior to the delete perform some action. Return true if you want the
@@ -89,27 +89,27 @@ public interface BeanPersistController {
* do not want the default delete to be performed.
*
*/
- public boolean preDelete(BeanPersistRequest> request);
+ boolean preDelete(BeanPersistRequest> request);
/**
* Called after the insert was performed.
*/
- public void postInsert(BeanPersistRequest> request);
+ void postInsert(BeanPersistRequest> request);
/**
* Called after the update was performed.
*/
- public void postUpdate(BeanPersistRequest> request);
+ void postUpdate(BeanPersistRequest> request);
/**
* Called after the delete was performed.
*/
- public void postDelete(BeanPersistRequest> request);
+ void postDelete(BeanPersistRequest> request);
/**
* Called after every each bean is fetched and loaded from the database. You
* can override this to derive some information to set to the bean.
*/
- public void postLoad(Object bean, Set includedProperties);
+ void postLoad(Object bean, Set includedProperties);
}
diff --git a/src/main/java/com/avaje/ebean/event/BeanPersistListener.java b/src/main/java/com/avaje/ebean/event/BeanPersistListener.java
index 50b3c098f..a1bcf6f89 100644
--- a/src/main/java/com/avaje/ebean/event/BeanPersistListener.java
+++ b/src/main/java/com/avaje/ebean/event/BeanPersistListener.java
@@ -43,7 +43,7 @@ public interface BeanPersistListener {
* Return true if this BeanPersistListener should be registered for events
* on this entity type.
*/
- public boolean isRegisterFor(Class> cls);
+ boolean isRegisterFor(Class> cls);
/**
* Notified that a bean has been inserted locally. Return true if you want the
@@ -52,7 +52,7 @@ public interface BeanPersistListener {
* @param bean
* The bean that was inserted.
*/
- public boolean inserted(Object bean);
+ boolean inserted(Object bean);
/**
* Notified that a bean has been updated locally. Return true if you want the
@@ -63,7 +63,7 @@ public interface BeanPersistListener {
* @param updatedProperties
* The properties that were modified by this update.
*/
- public boolean updated(Object bean, Set updatedProperties);
+ boolean updated(Object bean, Set updatedProperties);
/**
* Notified that a bean has been deleted locally. Return true if you want the
@@ -72,7 +72,7 @@ public interface BeanPersistListener {
* @param bean
* The bean that was deleted.
*/
- public boolean deleted(Object bean);
+ boolean deleted(Object bean);
/**
* Notify that a bean was inserted on another node of the cluster.
@@ -80,7 +80,7 @@ public interface BeanPersistListener {
* @param id
* the id value of the inserted bean
*/
- public void remoteInsert(Object id);
+ void remoteInsert(Object id);
/**
* Notify that a bean was updated on another node of the cluster.
@@ -88,7 +88,7 @@ public interface BeanPersistListener {
* @param id
* the id value of the updated bean.
*/
- public void remoteUpdate(Object id);
+ void remoteUpdate(Object id);
/**
* Notify that a bean was deleted on another node of the cluster.
@@ -96,6 +96,6 @@ public interface BeanPersistListener {
* @param id
* the id value of the deleted bean.
*/
- public void remoteDelete(Object id);
+ void remoteDelete(Object id);
}
diff --git a/src/main/java/com/avaje/ebean/event/BeanPersistRequest.java b/src/main/java/com/avaje/ebean/event/BeanPersistRequest.java
index 388b03325..cd142bff8 100644
--- a/src/main/java/com/avaje/ebean/event/BeanPersistRequest.java
+++ b/src/main/java/com/avaje/ebean/event/BeanPersistRequest.java
@@ -19,32 +19,32 @@ public interface BeanPersistRequest {
/**
* Return the server processing the request.
*/
- public EbeanServer getEbeanServer();
+ EbeanServer getEbeanServer();
/**
* Return the Transaction associated with this request.
*/
- public Transaction getTransaction();
+ Transaction getTransaction();
/**
* For an update or delete of a partially populated bean this is the set of
* loaded properties and otherwise returns null.
*/
- public Set getLoadedProperties();
+ Set getLoadedProperties();
/**
* For an update this is the set of properties that where updated.
*/
- public Set getUpdatedProperties();
+ Set getUpdatedProperties();
/**
* Returns the bean being inserted updated or deleted.
*/
- public T getBean();
+ T getBean();
/**
* Returns a map of the properties that have changed and their new and old values.
*/
- public Map getUpdatedValues();
+ Map getUpdatedValues();
}
diff --git a/src/main/java/com/avaje/ebean/event/BeanQueryAdapter.java b/src/main/java/com/avaje/ebean/event/BeanQueryAdapter.java
index 183eee6e3..5359b842a 100644
--- a/src/main/java/com/avaje/ebean/event/BeanQueryAdapter.java
+++ b/src/main/java/com/avaje/ebean/event/BeanQueryAdapter.java
@@ -24,18 +24,18 @@ public interface BeanQueryAdapter {
* Return true if this adapter is interested in queries for the given entity
* type.
*/
- public boolean isRegisterFor(Class> cls);
+ boolean isRegisterFor(Class> cls);
/**
* Returns an int to to control the order in which BeanQueryAdapter are
* executed when there is multiple of them registered for a given entity type
* (class).
*/
- public int getExecutionOrder();
+ int getExecutionOrder();
/**
* Modify the associated query prior to it being executed.
*/
- public void preQuery(BeanQueryRequest> request);
+ void preQuery(BeanQueryRequest> request);
}
diff --git a/src/main/java/com/avaje/ebean/event/BeanQueryRequest.java b/src/main/java/com/avaje/ebean/event/BeanQueryRequest.java
index cee77a31b..e3108ecbb 100644
--- a/src/main/java/com/avaje/ebean/event/BeanQueryRequest.java
+++ b/src/main/java/com/avaje/ebean/event/BeanQueryRequest.java
@@ -12,16 +12,16 @@ public interface BeanQueryRequest {
/**
* Return the server processing the request.
*/
- public EbeanServer getEbeanServer();
+ EbeanServer getEbeanServer();
/**
* Return the Transaction associated with this request.
*/
- public Transaction getTransaction();
+ Transaction getTransaction();
/**
* Returns the query.
*/
- public Query getQuery();
+ Query getQuery();
}
diff --git a/src/main/java/com/avaje/ebean/event/BulkTableEvent.java b/src/main/java/com/avaje/ebean/event/BulkTableEvent.java
index 386bdd07d..ed0fbbc0c 100644
--- a/src/main/java/com/avaje/ebean/event/BulkTableEvent.java
+++ b/src/main/java/com/avaje/ebean/event/BulkTableEvent.java
@@ -10,21 +10,21 @@ public interface BulkTableEvent {
/**
* Return the name of the table that was involved.
*/
- public String getTableName();
+ String getTableName();
/**
* Return true if rows were inserted.
*/
- public boolean isInsert();
+ boolean isInsert();
/**
* Return true if rows were updated.
*/
- public boolean isUpdate();
+ boolean isUpdate();
/**
* Return true if rows were deleted.
*/
- public boolean isDelete();
+ boolean isDelete();
}
diff --git a/src/main/java/com/avaje/ebean/event/BulkTableEventListener.java b/src/main/java/com/avaje/ebean/event/BulkTableEventListener.java
index c38beef80..db1959cf6 100644
--- a/src/main/java/com/avaje/ebean/event/BulkTableEventListener.java
+++ b/src/main/java/com/avaje/ebean/event/BulkTableEventListener.java
@@ -20,11 +20,11 @@ public interface BulkTableEventListener {
/**
* Return the tables that this listener is interested in.
*/
- public Set registeredTables();
+ Set registeredTables();
/**
* Process the event.
*/
- public void process(BulkTableEvent bulkTableEvent);
+ void process(BulkTableEvent bulkTableEvent);
}
diff --git a/src/main/java/com/avaje/ebean/event/ServerConfigStartup.java b/src/main/java/com/avaje/ebean/event/ServerConfigStartup.java
index 8b097a7d0..080058afe 100644
--- a/src/main/java/com/avaje/ebean/event/ServerConfigStartup.java
+++ b/src/main/java/com/avaje/ebean/event/ServerConfigStartup.java
@@ -16,6 +16,6 @@ public interface ServerConfigStartup {
/**
* On starting configure the ServerConfig.
*/
- public void onStart(ServerConfig serverConfig);
+ void onStart(ServerConfig serverConfig);
}
diff --git a/src/main/java/com/avaje/ebean/event/TransactionEventListener.java b/src/main/java/com/avaje/ebean/event/TransactionEventListener.java
index a82e70f68..59dc47ce3 100644
--- a/src/main/java/com/avaje/ebean/event/TransactionEventListener.java
+++ b/src/main/java/com/avaje/ebean/event/TransactionEventListener.java
@@ -9,10 +9,10 @@ public interface TransactionEventListener {
/**
* Called after the transaction has been committed
*/
- public void postTransactionCommit(Transaction tx);
+ void postTransactionCommit(Transaction tx);
/**
* Called after the transaction has been rolled back
*/
- public void postTransactionRollback(Transaction tx, Throwable cause);
+ void postTransactionRollback(Transaction tx, Throwable cause);
}
diff --git a/src/main/java/com/avaje/ebean/meta/MetaBeanInfo.java b/src/main/java/com/avaje/ebean/meta/MetaBeanInfo.java
index dbe181154..3059dc368 100644
--- a/src/main/java/com/avaje/ebean/meta/MetaBeanInfo.java
+++ b/src/main/java/com/avaje/ebean/meta/MetaBeanInfo.java
@@ -7,11 +7,11 @@ public interface MetaBeanInfo {
/**
* Collect the current query plan statistics return the non-empty statistics.
*/
- public List collectQueryPlanStatistics(boolean reset);
+ List collectQueryPlanStatistics(boolean reset);
/**
* Collect the current query plan statistics return all the statistics (include query plans that haven't had query executions).
*/
- public List collectAllQueryPlanStatistics(boolean reset);
+ List collectAllQueryPlanStatistics(boolean reset);
}
diff --git a/src/main/java/com/avaje/ebean/meta/MetaInfoManager.java b/src/main/java/com/avaje/ebean/meta/MetaInfoManager.java
index a8493aea7..795b1a999 100644
--- a/src/main/java/com/avaje/ebean/meta/MetaInfoManager.java
+++ b/src/main/java/com/avaje/ebean/meta/MetaInfoManager.java
@@ -10,12 +10,12 @@ public interface MetaInfoManager {
/**
* Return the MetaBeanInfo for a bean type.
*/
- public MetaBeanInfo getMetaBeanInfo(Class> beanClass);
+ MetaBeanInfo getMetaBeanInfo(Class> beanClass);
/**
* Return all the MetaBeanInfo.
*/
- public List getMetaBeanInfoList();
+ List getMetaBeanInfoList();
/**
* Collect and return the query plan statistics for all the beans.
@@ -24,7 +24,7 @@ public interface MetaInfoManager {
* executions (since the last collection with reset).
*
*/
- public List collectQueryPlanStatistics(boolean reset);
+ List collectQueryPlanStatistics(boolean reset);
/**
* Collect and return the ObjectGraphNode statistics.
@@ -37,6 +37,6 @@ public interface MetaInfoManager {
* @param reset
* Set to true to reset the underlying statistics after collection.
*/
- public List collectNodeStatistics(boolean reset);
+ List collectNodeStatistics(boolean reset);
}
diff --git a/src/main/java/com/avaje/ebean/meta/MetaObjectGraphNodeStats.java b/src/main/java/com/avaje/ebean/meta/MetaObjectGraphNodeStats.java
index c9d4ea5df..4ed1934d3 100644
--- a/src/main/java/com/avaje/ebean/meta/MetaObjectGraphNodeStats.java
+++ b/src/main/java/com/avaje/ebean/meta/MetaObjectGraphNodeStats.java
@@ -16,26 +16,26 @@ public interface MetaObjectGraphNodeStats {
/**
* Return the ObjectGraphNode which has the origin point and relative path.
*/
- public ObjectGraphNode getNode();
+ ObjectGraphNode getNode();
/**
* Return the startTime of statistics collection.
*/
- public long getStartTime();
+ long getStartTime();
/**
* Return the total count of queries executed for this node.
*/
- public long getCount();
+ long getCount();
/**
* Return the total time of queries executed for this node.
*/
- public long getTotalTime();
+ long getTotalTime();
/**
* Return the total beans loaded by queries for this node.
*/
- public long getTotalBeans();
+ long getTotalBeans();
}
\ No newline at end of file
diff --git a/src/main/java/com/avaje/ebean/meta/MetaQueryPlanOriginCount.java b/src/main/java/com/avaje/ebean/meta/MetaQueryPlanOriginCount.java
index ee53702c8..84caeb727 100644
--- a/src/main/java/com/avaje/ebean/meta/MetaQueryPlanOriginCount.java
+++ b/src/main/java/com/avaje/ebean/meta/MetaQueryPlanOriginCount.java
@@ -22,12 +22,12 @@ public interface MetaQueryPlanOriginCount {
* navigation path that resulted in this query being executed.
*
*/
- public ObjectGraphNode getObjectGraphNode();
+ ObjectGraphNode getObjectGraphNode();
/**
* The number of times a query was fired for this node since the counter was
* last reset.
*/
- public long getCount();
+ long getCount();
}
\ No newline at end of file
diff --git a/src/main/java/com/avaje/ebean/meta/MetaQueryPlanStatistic.java b/src/main/java/com/avaje/ebean/meta/MetaQueryPlanStatistic.java
index d680a15a9..777cbec54 100644
--- a/src/main/java/com/avaje/ebean/meta/MetaQueryPlanStatistic.java
+++ b/src/main/java/com/avaje/ebean/meta/MetaQueryPlanStatistic.java
@@ -12,27 +12,27 @@ public interface MetaQueryPlanStatistic {
/**
* Return the bean type this query plan is for.
*/
- public Class> getBeanType();
+ Class> getBeanType();
/**
* Return true if this query plan was tuned by Autofetch.
*/
- public boolean isAutofetchTuned();
+ boolean isAutofetchTuned();
/**
* Return a string representation of the query plan hash.
*/
- public String getQueryPlanHash();
+ String getQueryPlanHash();
/**
* Return the sql executed.
*/
- public String getSql();
+ String getSql();
/**
* Return the total number of queries executed.
*/
- public long getExecutionCount();
+ long getExecutionCount();
/**
* Return the total number of beans loaded by the queries.
@@ -40,27 +40,27 @@ public interface MetaQueryPlanStatistic {
* This excludes background fetching.
*
*/
- public long getTotalLoadedBeans();
+ long getTotalLoadedBeans();
/**
* Return the total time taken by executions of this query.
*/
- public long getTotalTimeMicros();
+ long getTotalTimeMicros();
/**
* Return the max execution time for this query.
*/
- public long getMaxTimeMicros();
+ long getMaxTimeMicros();
/**
* Return the time collection started (or was last reset).
*/
- public long getCollectionStart();
+ long getCollectionStart();
/**
* Return the time of the last query executed using this plan.
*/
- public long getLastQueryTime();
+ long getLastQueryTime();
/**
* Return the average query execution time in microseconds.
@@ -68,7 +68,7 @@ public interface MetaQueryPlanStatistic {
* This excludes background fetching.
*
*/
- public long getAvgTimeMicros();
+ long getAvgTimeMicros();
/**
* Return the average number of bean loaded per query.
@@ -76,7 +76,7 @@ public interface MetaQueryPlanStatistic {
* This excludes background fetching.
*
*/
- public long getAvgLoadedBeans();
+ long getAvgLoadedBeans();
/**
* Return the 'origin' points and paths that resulted in the query being
@@ -86,6 +86,6 @@ public interface MetaQueryPlanStatistic {
* This includes direct and lazy loading paths.
*
*/
- public List getOrigins();
+ List getOrigins();
}
diff --git a/src/main/java/com/avaje/ebean/text/StringFormatter.java b/src/main/java/com/avaje/ebean/text/StringFormatter.java
index 62e760c88..34aee914f 100644
--- a/src/main/java/com/avaje/ebean/text/StringFormatter.java
+++ b/src/main/java/com/avaje/ebean/text/StringFormatter.java
@@ -13,5 +13,5 @@ public interface StringFormatter {
/**
* Convert an Object value into a String value.
*/
- public String format(Object value);
+ String format(Object value);
}
diff --git a/src/main/java/com/avaje/ebean/text/StringParser.java b/src/main/java/com/avaje/ebean/text/StringParser.java
index 9eb239ea8..d790736b8 100644
--- a/src/main/java/com/avaje/ebean/text/StringParser.java
+++ b/src/main/java/com/avaje/ebean/text/StringParser.java
@@ -13,5 +13,5 @@ public interface StringParser {
/**
* Convert a String value into an Object value.
*/
- public Object parse(String value);
+ Object parse(String value);
}
diff --git a/src/main/java/com/avaje/ebean/text/csv/CsvCallback.java b/src/main/java/com/avaje/ebean/text/csv/CsvCallback.java
index 44125a155..09608fe40 100644
--- a/src/main/java/com/avaje/ebean/text/csv/CsvCallback.java
+++ b/src/main/java/com/avaje/ebean/text/csv/CsvCallback.java
@@ -23,7 +23,7 @@ public interface CsvCallback {
* size etc.
*
*/
- public void begin(EbeanServer server);
+ void begin(EbeanServer server);
/**
* Read the header row.
@@ -35,14 +35,14 @@ public interface CsvCallback {
* @param line
* the header line content.
*/
- public void readHeader(String[] line);
+ void readHeader(String[] line);
/**
* Check that the row should be processed - return true to process the row or
* false to ignore the row. Gives ability to handle bad data... empty rows etc
* and ignore it rather than fail.
*/
- public boolean processLine(int row, String[] line);
+ boolean processLine(int row, String[] line);
/**
* Called for each bean after it has been loaded from the CSV content.
@@ -62,7 +62,7 @@ public interface CsvCallback {
* @param bean
* the entity bean after it has been loaded from the csv content
*/
- public void processBean(int row, String[] line, T bean);
+ void processBean(int row, String[] line, T bean);
/**
* The processing has ended successfully.
@@ -70,7 +70,7 @@ public interface CsvCallback {
* Typically the callback will commit the transaction.
*
*/
- public void end(int row);
+ void end(int row);
/**
* The processing has ended due to an error.
@@ -84,6 +84,6 @@ public interface CsvCallback {
* @param e
* the error that occured
*/
- public void endWithError(int row, Exception e);
+ void endWithError(int row, Exception e);
}
diff --git a/src/main/java/com/avaje/ebean/text/csv/CsvReader.java b/src/main/java/com/avaje/ebean/text/csv/CsvReader.java
index d35adc00e..c8b45011e 100644
--- a/src/main/java/com/avaje/ebean/text/csv/CsvReader.java
+++ b/src/main/java/com/avaje/ebean/text/csv/CsvReader.java
@@ -48,22 +48,22 @@ public interface CsvReader {
/**
* Explicitly set the default Locale.
*/
- public void setDefaultLocale(Locale defaultLocale);
+ void setDefaultLocale(Locale defaultLocale);
/**
* Set the default format to use for Time types.
*/
- public void setDefaultTimeFormat(String defaultTimeFormat);
+ void setDefaultTimeFormat(String defaultTimeFormat);
/**
* Set the default format to use for Date types.
*/
- public void setDefaultDateFormat(String defaultDateFormat);
+ void setDefaultDateFormat(String defaultDateFormat);
/**
* Set the default format to use for Timestamp types.
*/
- public void setDefaultTimestampFormat(String defaultTimestampFormat);
+ void setDefaultTimestampFormat(String defaultTimestampFormat);
/**
* Set the batch size for using JDBC statement batching.
@@ -72,7 +72,7 @@ public interface CsvReader {
* JDBC statement batching.
*
*/
- public void setPersistBatchSize(int persistBatchSize);
+ void setPersistBatchSize(int persistBatchSize);
/**
* Set to true if there is a header row that should be ignored.
@@ -84,7 +84,7 @@ public interface CsvReader {
* add the properties yourself.
*
*/
- public void setHasHeader(boolean hasHeader, boolean addPropertiesFromHeader);
+ void setHasHeader(boolean hasHeader, boolean addPropertiesFromHeader);
/**
* Same as setHasHeader(true,true);
@@ -93,7 +93,7 @@ public interface CsvReader {
* default formats for time, date and datetime types.
*
*/
- public void setAddPropertiesFromHeader();
+ void setAddPropertiesFromHeader();
/**
* Same as setHasHeader(true, false);
@@ -101,7 +101,7 @@ public interface CsvReader {
* This indicates that there is a header but that it should be ignored.
*
*/
- public void setIgnoreHeader();
+ void setIgnoreHeader();
/**
* Set the frequency with which a INFO message will be logged showing the
@@ -110,12 +110,12 @@ public interface CsvReader {
* If this is not set then no INFO messages will be logged.
*
*/
- public void setLogInfoFrequency(int logInfoFrequency);
+ void setLogInfoFrequency(int logInfoFrequency);
/**
* Ignore the next column of data.
*/
- public void addIgnore();
+ void addIgnore();
/**
* Define the property which will be loaded from the next column of data.
@@ -124,27 +124,27 @@ public interface CsvReader {
* String to object conversion automatically.
*
*/
- public void addProperty(String propertyName);
+ void addProperty(String propertyName);
/**
* Define the next property and use a custom StringParser to convert the
* string content into the appropriate type for the property.
*/
- public void addProperty(String propertyName, StringParser parser);
+ void addProperty(String propertyName, StringParser parser);
/**
* Add a property with a custom Date/Time/Timestamp format using the default
* Locale. This will convert the string into the appropriate java type for the
* given property (Date, Calendar, SQL Date, Time, Timestamp, JODA etc).
*/
- public void addDateTime(String propertyName, String dateTimeFormat);
+ void addDateTime(String propertyName, String dateTimeFormat);
/**
* Add a property with a custom Date/Time/Timestamp format. This will convert
* the string into the appropriate java type for the given property (Date,
* Calendar, SQL Date, Time, Timestamp, JODA etc).
*/
- public void addDateTime(String propertyName, String dateTimeFormat, Locale locale);
+ void addDateTime(String propertyName, String dateTimeFormat, Locale locale);
/**
* Automatically create a transaction if required to process all the CSV
@@ -155,7 +155,7 @@ public interface CsvReader {
* processing. This will also set the persistBatchSize on the transaction.
*
*/
- public void process(Reader reader) throws Exception;
+ void process(Reader reader) throws Exception;
/**
* Process the CSV content passing the bean to the CsvCallback after each row.
@@ -168,6 +168,6 @@ public interface CsvReader {
* create your own transaction and save the bean(s) yourself.
*
*/
- public void process(Reader reader, CsvCallback callback) throws Exception;
+ void process(Reader reader, CsvCallback callback) throws Exception;
}
\ No newline at end of file
diff --git a/src/main/java/com/avaje/ebean/text/json/JsonContext.java b/src/main/java/com/avaje/ebean/text/json/JsonContext.java
index 653519f63..8c32a2234 100644
--- a/src/main/java/com/avaje/ebean/text/json/JsonContext.java
+++ b/src/main/java/com/avaje/ebean/text/json/JsonContext.java
@@ -19,42 +19,42 @@ public interface JsonContext {
*
* @throws JsonIOException When IOException occurs
*/
- public T toBean(Class rootType, String json) throws JsonIOException;
+ T toBean(Class rootType, String json) throws JsonIOException;
/**
* Convert json reader input into a Bean of a specific type.
*
* @throws JsonIOException When IOException occurs
*/
- public T toBean(Class rootType, Reader json) throws JsonIOException;
+ T toBean(Class rootType, Reader json) throws JsonIOException;
/**
* Convert json parser input into a Bean of a specific type.
*
* @throws JsonIOException When IOException occurs
*/
- public T toBean(Class cls, JsonParser parser) throws JsonIOException;
+ T toBean(Class cls, JsonParser parser) throws JsonIOException;
/**
* Convert json string input into a list of beans of a specific type.
*
* @throws JsonIOException When IOException occurs
*/
- public List toList(Class rootType, String json) throws JsonIOException;
+ List toList(Class rootType, String json) throws JsonIOException;
/**
* Convert json reader input into a list of beans of a specific type.
*
* @throws JsonIOException When IOException occurs
*/
- public List toList(Class rootType, Reader json) throws JsonIOException;
+ List toList(Class rootType, Reader json) throws JsonIOException;
/**
* Convert json parser input into a list of beans of a specific type.
*
* @throws JsonIOException When IOException occurs
*/
- public List toList(Class cls, JsonParser src) throws JsonIOException;
+ List toList(Class cls, JsonParser src) throws JsonIOException;
/**
* Use the genericType to determine if this should be converted into a List or
@@ -62,7 +62,7 @@ public interface JsonContext {
*
* @throws JsonIOException When IOException occurs
*/
- public Object toObject(Type genericType, Reader json) throws JsonIOException;
+ Object toObject(Type genericType, Reader json) throws JsonIOException;
/**
* Use the genericType to determine if this should be converted into a List or
@@ -70,7 +70,7 @@ public interface JsonContext {
*
* @throws JsonIOException When IOException occurs
*/
- public Object toObject(Type genericType, String json) throws JsonIOException;
+ Object toObject(Type genericType, String json) throws JsonIOException;
/**
* Use the genericType to determine if this should be converted into a List or
@@ -78,45 +78,45 @@ public interface JsonContext {
*
* @throws JsonIOException When IOException occurs
*/
- public Object toObject(Type genericType, JsonParser jsonParser) throws JsonIOException;
+ Object toObject(Type genericType, JsonParser jsonParser) throws JsonIOException;
/**
* Return the bean or collection as JSON string.
*
* @throws JsonIOException When IOException occurs
*/
- public String toJson(Object value) throws JsonIOException;
+ String toJson(Object value) throws JsonIOException;
/**
* Write the bean or collection in JSON format to the writer.
*
* @throws JsonIOException When IOException occurs
*/
- public void toJson(Object value, Writer writer) throws JsonIOException;
+ void toJson(Object value, Writer writer) throws JsonIOException;
/**
* Write the bean or collection to the JsonGenerator.
*
* @throws JsonIOException When IOException occurs
*/
- public void toJson(Object value, JsonGenerator generator) throws JsonIOException;
+ void toJson(Object value, JsonGenerator generator) throws JsonIOException;
/**
* Return the bean or collection as JSON string using PathProperties.
*
* @throws JsonIOException When IOException occurs
*/
- public String toJson(Object value, PathProperties pathProperties) throws JsonIOException;
+ String toJson(Object value, PathProperties pathProperties) throws JsonIOException;
/**
* Write the bean or collection as json to the writer using the PathProperties.
*/
- public void toJson(Object value, Writer writer, PathProperties pathProperties) throws JsonIOException;
+ void toJson(Object value, Writer writer, PathProperties pathProperties) throws JsonIOException;
/**
* Write the bean or collection to the JsonGenerator using the PathProperties.
*/
- public void toJson(Object value, JsonGenerator generator, PathProperties pathProperties) throws JsonIOException;
+ void toJson(Object value, JsonGenerator generator, PathProperties pathProperties) throws JsonIOException;
/**
* Deprecated in favour of using PathProperties by itself.
@@ -124,7 +124,7 @@ public interface JsonContext {
*
* @deprecated
*/
- public void toJson(Object value, JsonGenerator generator, JsonWriteOptions options) throws JsonIOException;
+ void toJson(Object value, JsonGenerator generator, JsonWriteOptions options) throws JsonIOException;
/**
* Deprecated in favour of using PathProperties by itself.
@@ -133,7 +133,7 @@ public interface JsonContext {
* @throws JsonIOException When IOException occurs
* @deprecated
*/
- public void toJson(Object value, Writer writer, JsonWriteOptions options) throws JsonIOException;
+ void toJson(Object value, Writer writer, JsonWriteOptions options) throws JsonIOException;
/**
* Deprecated in favour of using PathProperties by itself.
@@ -142,25 +142,25 @@ public interface JsonContext {
* @throws JsonIOException When IOException occurs
* @deprecated
*/
- public String toJson(Object value, JsonWriteOptions options) throws JsonIOException;
+ String toJson(Object value, JsonWriteOptions options) throws JsonIOException;
/**
* Return true if the type is known as an Entity bean or a List Set or
* Map of entity beans.
*/
- public boolean isSupportedType(Type genericType);
+ boolean isSupportedType(Type genericType);
/**
* Create and return a new JsonGenerator for the given writer.
*
* @throws JsonIOException When IOException occurs
*/
- public JsonGenerator createGenerator(Writer writer) throws JsonIOException;
+ JsonGenerator createGenerator(Writer writer) throws JsonIOException;
/**
* Create and return a new JsonParser for the given reader.
*
* @throws JsonIOException When IOException occurs
*/
- public JsonParser createParser(Reader reader) throws JsonIOException;
+ JsonParser createParser(Reader reader) throws JsonIOException;
}
\ No newline at end of file
diff --git a/src/test/java/com/avaje/tests/transaction/TestBeginTransactionWithExisting.java b/src/test/java/com/avaje/tests/transaction/TestBeginTransactionWithExisting.java
index fcb0f8ad5..a0abc175a 100644
--- a/src/test/java/com/avaje/tests/transaction/TestBeginTransactionWithExisting.java
+++ b/src/test/java/com/avaje/tests/transaction/TestBeginTransactionWithExisting.java
@@ -3,19 +3,34 @@ package com.avaje.tests.transaction;
import com.avaje.ebean.BaseTestCase;
import com.avaje.ebean.Ebean;
import com.avaje.ebean.Transaction;
+import com.avaje.ebean.TxIsolation;
import org.junit.Test;
import javax.persistence.PersistenceException;
+import java.sql.Connection;
+
+import static org.junit.Assert.assertEquals;
public class TestBeginTransactionWithExisting extends BaseTestCase {
+ @Test
+ public void testTransactionIsoLevels() {
+
+ assertEquals(Transaction.READ_COMMITTED, Connection.TRANSACTION_READ_COMMITTED);
+ assertEquals(Transaction.READ_UNCOMMITTED, Connection.TRANSACTION_READ_UNCOMMITTED);
+ assertEquals(Transaction.REPEATABLE_READ, Connection.TRANSACTION_REPEATABLE_READ);
+ assertEquals(Transaction.SERIALIZABLE, Connection.TRANSACTION_SERIALIZABLE);
+ }
+
@Test(expected = PersistenceException.class)
public void test() {
+ assertEquals(Transaction.READ_COMMITTED, Connection.TRANSACTION_READ_COMMITTED);
+
Transaction txn = Ebean.beginTransaction();
try {
- Ebean.beginTransaction();
+ Ebean.beginTransaction(TxIsolation.READ_COMMITED);
} finally {
txn.end();