add missing @override (#975)

* no effective code change: add missing @override in "io.ebean.*" package
* no effective code change: add missing @override in "io.ebeaninternal.api.*" package
* no effective code change: add missing @override in "io.ebeaninternal.server.*" package
* no effective code change: add missing @override in "io.ebeaninternal.util.*" package
* no effective code change: add missing @override in "io.ebeanservice.*" package
* no effective code change: add missing @override in "src/test/java/"
This commit is contained in:
Roland Praml authored and Rob Bygrave committed 2017-02-24 00:01:25 +13:00
1 parent 43c978e41a
commit 40f5596837
300 files changed
+1492 -12

No files matched your search

@@ -16,6 +16,7 @@ public class BatchDepthComparator implements Comparator<BatchedBeanHolder>, Seri
private static final long serialVersionUID = 264611821665757991L;
@Override
public int compare(BatchedBeanHolder b1, BatchedBeanHolder b2) {
if (b1.getOrder() < b2.getOrder()) {
@@ -99,6 +99,7 @@ public class BatchedBeanHolder {
persistedBeans.clear();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder(shortDesc.length() + 18);
sb.append(shortDesc);
@@ -80,6 +80,7 @@ public class BindValues {
return name;
}
@Override
public String toString() {
return String.valueOf(value);
}
@@ -35,6 +35,7 @@ final class DefaultPersistExecute implements PersistExecute {
this.defaultBatchSize = defaultBatchSize;
}
@Override
public BatchControl createBatchControl(SpiTransaction t) {
// create a BatchControl and set its defaults
@@ -44,6 +45,7 @@ final class DefaultPersistExecute implements PersistExecute {
/**
* Execute the updateSqlRequest
*/
@Override
public int executeOrmUpdate(PersistRequestOrmUpdate request) {
return exeOrmUpdate.execute(request);
}
@@ -51,6 +53,7 @@ final class DefaultPersistExecute implements PersistExecute {
/**
* Execute the updateSqlRequest
*/
@Override
public int executeSqlUpdate(PersistRequestUpdateSql request) {
return exeUpdateSql.execute(request);
}
@@ -58,6 +61,7 @@ final class DefaultPersistExecute implements PersistExecute {
/**
* Execute the CallableSqlRequest.
*/
@Override
public int executeSqlCallable(PersistRequestCallableSql request) {
return exeCallableSql.execute(request);
}
@@ -84,6 +84,7 @@ public final class DefaultPersister implements Persister {
/**
* Execute the CallableSql.
*/
@Override
public int executeCallable(CallableSql callSql, Transaction t) {
return executeOrQueue(new PersistRequestCallableSql(server, callSql, (SpiTransaction) t, persistExecute));
@@ -92,6 +93,7 @@ public final class DefaultPersister implements Persister {
/**
* Execute the orm update.
*/
@Override
public int executeOrmUpdate(Update<?> update, Transaction t) {
SpiUpdate<?> ormUpdate = (SpiUpdate<?>) update;
@@ -122,6 +124,7 @@ public final class DefaultPersister implements Persister {
/**
* Execute the updateSql.
*/
@Override
public int executeSqlUpdate(SqlUpdate updSql, Transaction t) {
return executeOrQueue(new PersistRequestUpdateSql(server, updSql, (SpiTransaction) t, persistExecute));
@@ -343,6 +346,7 @@ public final class DefaultPersister implements Persister {
/**
* Update the bean.
*/
@Override
public void update(EntityBean entityBean, Transaction t) {
update(entityBean, t, updatesDeleteMissingChildren);
}
@@ -350,6 +354,7 @@ public final class DefaultPersister implements Persister {
/**
* Update the bean specifying deleteMissingChildren.
*/
@Override
public void update(EntityBean entityBean, Transaction t, boolean deleteMissingChildren) {
PersistRequestBean<?> req = createRequest(entityBean, t, PersistRequest.Type.UPDATE);
@@ -379,6 +384,7 @@ public final class DefaultPersister implements Persister {
/**
* Insert or update the bean.
*/
@Override
public void save(EntityBean bean, Transaction t) {
if (bean._ebean_getIntercept().isLoaded()) {
// deleteMissingChildren is false when using 'save' on 'loaded' beans
@@ -391,6 +397,7 @@ public final class DefaultPersister implements Persister {
/**
* Insert this bean.
*/
@Override
public void insert(EntityBean bean, Transaction t) {
PersistRequestBean<?> req = createRequest(bean, t, PersistRequest.Type.INSERT);
@@ -499,6 +506,7 @@ public final class DefaultPersister implements Persister {
* Delete the bean with the explicit transaction.
* Return false if the delete is executed without OCC and 0 rows were deleted.
*/
@Override
public boolean delete(EntityBean bean, Transaction t, boolean permanent) {
Type deleteType = permanent ? Type.DELETE_PERMANENT : Type.DELETE;
@@ -565,6 +573,7 @@ public final class DefaultPersister implements Persister {
/**
* Delete by a List of Id's.
*/
@Override
public int deleteMany(Class<?> beanType, Collection<?> ids, Transaction transaction, boolean permanent) {
if (ids == null || ids.isEmpty()) {
@@ -586,6 +595,7 @@ public final class DefaultPersister implements Persister {
/**
* Delete by Id.
*/
@Override
public int delete(Class<?> beanType, Object id, Transaction transaction, boolean permanent) {
BeanDescriptor<?> descriptor = beanDescriptorManager.getBeanDescriptor(beanType);
id = descriptor.convertId(id);
@@ -35,6 +35,7 @@ public final class DmlBeanPersister implements BeanPersister {
/**
* execute the bean delete request.
*/
@Override
public int delete(PersistRequestBean<?> request) {
DeleteHandler delete = new DeleteHandler(request, deleteMeta);
@@ -44,6 +45,7 @@ public final class DmlBeanPersister implements BeanPersister {
/**
* execute the bean insert request.
*/
@Override
public void insert(PersistRequestBean<?> request) {
InsertHandler insert = new InsertHandler(request, insertMeta);
@@ -53,6 +55,7 @@ public final class DmlBeanPersister implements BeanPersister {
/**
* execute the bean update request.
*/
@Override
public void update(PersistRequestBean<?> request) {
UpdateHandler update = new UpdateHandler(request, updateMeta);
@@ -19,6 +19,7 @@ public class DmlBeanPersisterFactory implements BeanPersisterFactory {
/**
* Create a DmlBeanPersister for the given bean type.
*/
@Override
public BeanPersister create(BeanDescriptor<?> desc) {
if (desc.isDocStoreOnly()) {
@@ -69,6 +69,7 @@ public class GenerateDmlRequest {
return insertBindBuffer.toString();
}
@Override
public String toString() {
return sb.toString();
}
@@ -45,6 +45,7 @@ public class UpdatePlan implements SpiUpdatePlan {
this.timeCreated = System.currentTimeMillis();
}
@Override
public boolean isEmptySetClause() {
return emptySetClause;
}
@@ -52,6 +53,7 @@ public class UpdatePlan implements SpiUpdatePlan {
/**
* Run the prepared statement binding for the 'update set' properties.
*/
@Override
public void bindSet(DmlHandler bind, EntityBean bean) throws SQLException {
set.dmlBind(bind, bean);
// atomic on 64 bit jvm
@@ -61,6 +63,7 @@ public class UpdatePlan implements SpiUpdatePlan {
/**
* Return the time this plan was created.
*/
@Override
public long getTimeCreated() {
return timeCreated;
}
@@ -68,6 +71,7 @@ public class UpdatePlan implements SpiUpdatePlan {
/**
* Return the time this plan was last used.
*/
@Override
public long getTimeLastUsed() {
return timeLastUsed;
}
@@ -75,6 +79,7 @@ public class UpdatePlan implements SpiUpdatePlan {
/**
* Return the key.
*/
@Override
public String getKey() {
return key;
}
@@ -82,6 +87,7 @@ public class UpdatePlan implements SpiUpdatePlan {
/**
* Return the concurrency mode for this plan.
*/
@Override
public ConcurrencyMode getMode() {
return mode;
}
@@ -89,6 +95,7 @@ public class UpdatePlan implements SpiUpdatePlan {
/**
* Return the DML statement.
*/
@Override
public String getSql() {
return sql;
}
@@ -96,6 +103,7 @@ public class UpdatePlan implements SpiUpdatePlan {
/**
* Return the Bindable properties for the update set.
*/
@Override
public Bindable getSet() {
return set;
}
@@ -23,6 +23,7 @@ class BindableAssocOne implements Bindable {
this.importedId = assocOne.getImportedId();
}
@Override
public String toString() {
return "BindableAssocOne " + assocOne;
}
@@ -32,16 +33,19 @@ class BindableAssocOne implements Bindable {
return assocOne.isDraftOnly();
}
@Override
public void addToUpdate(PersistRequestBean<?> request, List<Bindable> list) {
if (request.isAddToUpdate(assocOne)) {
list.add(this);
}
}
@Override
public void dmlAppend(GenerateDmlRequest request) {
importedId.dmlAppend(request);
}
@Override
public void dmlBind(BindableRequest request, EntityBean bean) throws SQLException {
EntityBean assocBean = (EntityBean) assocOne.getValue(bean);
@@ -25,6 +25,7 @@ class BindableAssocOneGeneratedInsert extends BindableAssocOne {
throw new RuntimeException("never called");
}
@Override
public void dmlBind(BindableRequest request, EntityBean bean) throws SQLException {
Object objectValue = generatedProperty.getInsertValue(assocOne, bean, request.now());
@@ -27,6 +27,7 @@ class BindableAssocOneGeneratedUpdate extends BindableAssocOne {
}
}
@Override
public void dmlBind(BindableRequest request, EntityBean bean) throws SQLException {
Object objectValue = generatedProperty.getUpdateValue(assocOne, bean, request.now());
@@ -24,6 +24,7 @@ public class BindableDiscriminator implements Bindable {
this.sqlType = inheritInfo.getDiscriminatorType();
}
@Override
public String toString() {
return columnName + " = " + discValue;
}
@@ -23,6 +23,7 @@ public class BindableEmbedded implements Bindable {
this.items = bindList.toArray(new Bindable[bindList.size()]); //this.props = propList.toArray(new BeanProperty[propList.size()]);
}
@Override
public String toString() {
return "BindableEmbedded " + embProp + " items:" + Arrays.toString(items);
}
@@ -32,6 +33,7 @@ public class BindableEmbedded implements Bindable {
return embProp.isDraftOnly();
}
@Override
public void dmlAppend(GenerateDmlRequest request) {
for (Bindable item : items) {
@@ -39,12 +41,14 @@ public class BindableEmbedded implements Bindable {
}
}
@Override
public void addToUpdate(PersistRequestBean<?> request, List<Bindable> list) {
if (request.isAddToUpdate(embProp)) {
list.add(this);
}
}
@Override
public void dmlBind(BindableRequest bindRequest, EntityBean bean) throws SQLException {
// get the embedded bean
@@ -23,6 +23,7 @@ public class BindableEncryptedProperty implements Bindable {
this.bindEncryptDataFirst = bindEncryptDataFirst;
}
@Override
public String toString() {
return prop.toString();
}
@@ -32,12 +33,14 @@ public class BindableEncryptedProperty implements Bindable {
return prop.isDraftOnly();
}
@Override
public void addToUpdate(PersistRequestBean<?> request, List<Bindable> list) {
if (request.isAddToUpdate(prop)) {
list.add(this);
}
}
@Override
public void dmlAppend(GenerateDmlRequest request) {
// columnName = AES_ENCRYPT(?,?)
@@ -48,6 +51,7 @@ public class BindableEncryptedProperty implements Bindable {
/**
* Bind a value in a Insert SET clause.
*/
@Override
public void dmlBind(BindableRequest request, EntityBean bean) throws SQLException {
Object value = null;
@@ -34,14 +34,17 @@ public final class BindableIdEmbedded implements BindableId {
return false;
}
@Override
public boolean isEmpty() {
return false;
}
@Override
public boolean isConcatenated() {
return true;
}
@Override
public String getIdentityColumn() {
// return null for concatenated keys
return null;
@@ -55,10 +58,12 @@ public final class BindableIdEmbedded implements BindableId {
/**
* Does nothing for BindableId.
*/
@Override
public void addToUpdate(PersistRequestBean<?> request, List<Bindable> list) {
// do nothing (id not changing)
}
@Override
public void dmlBind(BindableRequest request, EntityBean bean) throws SQLException {
EntityBean idValue = (EntityBean) embId.getValue(bean);
@@ -72,12 +77,14 @@ public final class BindableIdEmbedded implements BindableId {
request.setIdValue(idValue);
}
@Override
public void dmlAppend(GenerateDmlRequest request) {
for (BeanProperty prop : props) {
request.appendColumn(prop.getDbColumn());
}
}
@Override
public boolean deriveConcatenatedId(PersistRequestBean<?> persist) {
if (matches == null) {
@@ -9,6 +9,7 @@ import java.util.List;
public class BindableIdEmpty implements BindableId {
@Override
public boolean isEmpty() {
return true;
}
@@ -18,26 +19,32 @@ public class BindableIdEmpty implements BindableId {
return false;
}
@Override
public void addToUpdate(PersistRequestBean<?> request, List<Bindable> list) {
// nothing
}
@Override
public void dmlAppend(GenerateDmlRequest request) {
// nothing
}
@Override
public void dmlBind(BindableRequest request, EntityBean bean) throws SQLException {
// nothing
}
@Override
public boolean isConcatenated() {
return false;
}
@Override
public String getIdentityColumn() {
return null;
}
@Override
public boolean deriveConcatenatedId(PersistRequestBean<?> persist) {
return false;
}
@@ -20,14 +20,17 @@ public final class BindableIdScalar implements BindableId {
this.uidProp = uidProp;
}
@Override
public boolean isEmpty() {
return false;
}
@Override
public boolean isConcatenated() {
return false;
}
@Override
public String getIdentityColumn() {
return uidProp.getDbColumn();
}
@@ -45,6 +48,7 @@ public final class BindableIdScalar implements BindableId {
/**
* Does nothing for BindableId.
*/
@Override
public void addToUpdate(PersistRequestBean<?> request, List<Bindable> list) {
// do nothing (id not changing)
}
@@ -52,15 +56,18 @@ public final class BindableIdScalar implements BindableId {
/**
* Should not be called as this is really only for concatenated keys.
*/
@Override
public boolean deriveConcatenatedId(PersistRequestBean<?> persist) {
throw new PersistenceException("Should not be called? only for concatinated keys");
}
@Override
public void dmlAppend(GenerateDmlRequest request) {
request.appendColumn(uidProp.getDbColumn());
}
@Override
public void dmlBind(BindableRequest request, EntityBean bean) throws SQLException {
Object value = uidProp.getValue(bean);
@@ -42,18 +42,21 @@ public class BindableList implements Bindable {
Collections.addAll(list, items);
}
@Override
public void addToUpdate(PersistRequestBean<?> request, List<Bindable> list) {
for (Bindable item : items) {
item.addToUpdate(request, list);
}
}
@Override
public void dmlAppend(GenerateDmlRequest request) {
for (Bindable item : items) {
item.dmlAppend(request);
}
}
@Override
public void dmlBind(BindableRequest bindRequest, EntityBean bean) throws SQLException {
for (Bindable item : items) {
item.dmlBind(bindRequest, bean);
@@ -19,6 +19,7 @@ public class BindableProperty implements Bindable {
this.prop = prop;
}
@Override
public String toString() {
return prop.toString();
}
@@ -28,12 +29,14 @@ public class BindableProperty implements Bindable {
return prop.isDraftOnly();
}
@Override
public void addToUpdate(PersistRequestBean<?> request, List<Bindable> list) {
if (request.isAddToUpdate(prop)) {
list.add(this);
}
}
@Override
public void dmlAppend(GenerateDmlRequest request) {
request.appendColumn(prop.getDbColumn());
}
@@ -41,6 +44,7 @@ public class BindableProperty implements Bindable {
/**
* Normal binding of a property value from the bean.
*/
@Override
public void dmlBind(BindableRequest request, EntityBean bean) throws SQLException {
Object value = null;
@@ -22,6 +22,7 @@ public class BindablePropertyInsertGenerated extends BindableProperty {
this.gen = gen;
}
@Override
public void dmlBind(BindableRequest request, EntityBean bean) throws SQLException {
Object value = gen.getInsertValue(prop, bean, request.now());
@@ -27,12 +27,14 @@ public class BindablePropertyUpdateGenerated extends BindableProperty {
/**
* Add BindablePropertyUpdateGenerated if the property is loaded.
*/
@Override
public void addToUpdate(PersistRequestBean<?> request, List<Bindable> list) {
if (gen.includeInAllUpdates() || request.isLoadedProperty(prop)) {
list.add(this);
}
}
@Override
public void dmlBind(BindableRequest request, EntityBean bean) throws SQLException {
Object value = gen.getUpdateValue(prop, bean, request.now());
@@ -33,6 +33,7 @@ public class BindableUnidirectional implements Bindable {
}
@Override
public String toString() {
return "BindableShadowFKey " + unidirectional;
}
@@ -42,16 +43,19 @@ public class BindableUnidirectional implements Bindable {
return false;
}
@Override
public void addToUpdate(PersistRequestBean<?> request, List<Bindable> list) {
throw new PersistenceException("Never called (for insert only)");
}
@Override
public void dmlAppend(GenerateDmlRequest request) {
// always included (in insert)
importedId.dmlAppend(request);
}
@Override
public void dmlBind(BindableRequest request, EntityBean bean) throws SQLException {
PersistRequestBean<?> persistRequest = request.getPersistRequest();