2
0
Fork 0

Removed duplicate public keywords.

This commit is contained in:
Willem Cazander 2014-08-24 13:25:42 +02:00
parent e14b484ca5
commit 30418cad13
90 changed files with 694 additions and 720 deletions

View file

@ -23,8 +23,6 @@
package net.forwardfire.vasc.backend;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
/**
* VascBackend provides stateless data access to a data source.
@ -34,66 +32,66 @@ import java.util.Map;
*/
public interface VascBackend<DATA_OBJECT extends Serializable> {
public String getId();
public void setId(String id);
String getId();
void setId(String id);
public void startBackend();
public void stopBackend();
void startBackend();
void stopBackend();
public VascBackendResult<DATA_OBJECT> execute(VascBackendState state) throws VascBackendException;
VascBackendResult<DATA_OBJECT> execute(VascBackendState state) throws VascBackendException;
public boolean isReadOnly();
boolean isReadOnly();
//public DATA_OBJECT fetch(Map<String,Serializable> pks) throws VascBackendException;
public void persist(DATA_OBJECT record) throws VascBackendException;
void persist(DATA_OBJECT record) throws VascBackendException;
public DATA_OBJECT merge(DATA_OBJECT record) throws VascBackendException;
DATA_OBJECT merge(DATA_OBJECT record) throws VascBackendException;
public void delete(DATA_OBJECT record) throws VascBackendException;
void delete(DATA_OBJECT record) throws VascBackendException;
/**
* Creates a new Field acces obj the the given field entry.
* note: Do not use inline class here because it needs to be seriabable and the backend is not seriabbzle.
* @return
*/
public VascEntryFieldValue<DATA_OBJECT> provideVascEntryFieldValue();
VascEntryFieldValue<DATA_OBJECT> provideVascEntryFieldValue();
/**
* Creates a new RecordCreater obj the the given entry.
* note: Do not use inline class here because it needs to be seriabable and the backend is not seriabbzle.
* @return
*/
public VascEntryRecordCreator<DATA_OBJECT> provideVascEntryRecordCreator();
VascEntryRecordCreator<DATA_OBJECT> provideVascEntryRecordCreator();
/**
* Defines if the backend supports sorting
* @return
*/
public boolean isSortable();
boolean isSortable();
/**
* Defines if the backend supports pageing
* @return
*/
public boolean isPageable();
boolean isPageable();
/**
* Defines if the backend supports pageing
* @return
*/
public boolean isSearchable();
boolean isSearchable();
/**
* Defines if the backend supports moveing an record up or down.
* @return
*/
public boolean isRecordMoveable();
public long doRecordMoveUpById(VascBackendState state,Object primaryId) throws VascBackendException;
public long doRecordMoveDownById(VascBackendState state,Object primaryId) throws VascBackendException;
boolean isRecordMoveable();
long doRecordMoveUpById(VascBackendState state,Object primaryId) throws VascBackendException;
long doRecordMoveDownById(VascBackendState state,Object primaryId) throws VascBackendException;
public boolean hasPageSummary();
boolean hasPageSummary();
public boolean hasTotalSummary();
boolean hasTotalSummary();
}

View file

@ -33,7 +33,7 @@ import java.util.List;
*/
public interface VascBackendController {
public VascBackend<Serializable> getVascBackendById(String id);
VascBackend<Serializable> getVascBackendById(String id);
public List<String> getVascBackendIds();
List<String> getVascBackendIds();
}

View file

@ -32,9 +32,9 @@ import java.io.Serializable;
*/
public interface VascBackendControllerLocal extends VascBackendController {
public void addVascBackend(VascBackend<? extends Serializable> backend);
void addVascBackend(VascBackend<? extends Serializable> backend);
public void removeVascBackendById(String backendId);
void removeVascBackendById(String backendId);
public void clearAndStopBackends();
void clearAndStopBackends();
}

View file

@ -33,26 +33,26 @@ import java.util.Set;
*/
public interface VascBackendState extends Serializable {
public void setDataParameter(String key,Object data);
public void removeDataParameter(String key);
public void removeDataParameterAll();
public Object getDataParameter(String key);
public Set<String> getDataParameterKeys();
void setDataParameter(String key,Object data);
void removeDataParameter(String key);
void removeDataParameterAll();
Object getDataParameter(String key);
Set<String> getDataParameterKeys();
public String getSortField();
public void setSortField(String name);
public boolean isSortAscending();
public void setSortAscending(boolean ascending);
String getSortField();
void setSortField(String name);
boolean isSortAscending();
void setSortAscending(boolean ascending);
public void setPageSize(int size);
public int getPageSize();
void setPageSize(int size);
int getPageSize();
public void setPageSizeMax(int size);
public int getPageSizeMax();
void setPageSizeMax(int size);
int getPageSizeMax();
public void setPageIndex(int index);
public int getPageIndex();
void setPageIndex(int index);
int getPageIndex();
public void setSearchString(String searchString);
public String getSearchString();
}
void setSearchString(String searchString);
String getSearchString();
}

View file

@ -33,9 +33,9 @@ import java.io.Serializable;
*/
public interface VascEntryFieldValue<DATA_OBJECT extends Serializable> extends Serializable {
public Serializable getValue(String backendName,DATA_OBJECT record) throws VascBackendException;
Serializable getValue(String backendName,DATA_OBJECT record) throws VascBackendException;
public String getDisplayValue(String backendName,DATA_OBJECT record) throws VascBackendException;
String getDisplayValue(String backendName,DATA_OBJECT record) throws VascBackendException;
public void setValue(String backendName,DATA_OBJECT record,Serializable value) throws VascBackendException;
void setValue(String backendName,DATA_OBJECT record,Serializable value) throws VascBackendException;
}

View file

@ -32,5 +32,5 @@ import java.io.Serializable;
*/
public interface VascEntryRecordCreator<DATA_OBJECT extends Serializable> extends Serializable {
public DATA_OBJECT newRecord() throws VascBackendException;
DATA_OBJECT newRecord() throws VascBackendException;
}

View file

@ -34,5 +34,5 @@ import java.sql.SQLException;
*/
public interface JdbcConnectionProvider {
Connection getJdbcConnection() throws SQLException;
Connection getJdbcConnection() throws SQLException;
}

View file

@ -32,7 +32,7 @@ import javax.persistence.EntityManager;
*/
public interface EntityManagerProvider {
public EntityManager getEntityManager();
EntityManager getEntityManager();
public boolean hasEntityManagerTransaction();
boolean hasEntityManagerTransaction();
}

View file

@ -31,5 +31,5 @@ import org.hibernate.Session;
*/
public interface HibernateSessionProvider {
public Session getHibernateSession();
Session getHibernateSession();
}

View file

@ -36,5 +36,5 @@ public interface MetaModelDataContextProvider {
* Returns a DB connection.
* @return An DB connection to mongodb
*/
public DataContext getDataContext();
DataContext getDataContext();
}

View file

@ -16,20 +16,20 @@ public interface CrudDataContext extends UpdateableDataContext {
/**
* Creates empty row to fill and persist.
*/
public UpdateableRow createRow(Table table);
UpdateableRow createRow(Table table);
/**
* Inserts row into table.
*/
public void persist(UpdateableRow row);
void persist(UpdateableRow row);
/**
* Merges row with table.
*/
public UpdateableRow merge(UpdateableRow row);
UpdateableRow merge(UpdateableRow row);
/**
* Deletes row from table.
*/
public void delete(UpdateableRow row);
void delete(UpdateableRow row);
}

View file

@ -14,6 +14,5 @@ import org.eobjects.metamodel.data.Style;
*/
public interface RowLocal extends Row {
public void setStyle(int index,Style style);
void setStyle(int index,Style style);
}

View file

@ -16,24 +16,24 @@ import org.eobjects.metamodel.schema.Table;
public interface UpdateableRow extends Row {
// TODO: move these 3 to Row interface
public SelectItem getSelectItem(int index);
public Object getValue(String columnName);
public static final int INDEX_NOT_FOUND = -1;
SelectItem getSelectItem(int index);
Object getValue(String columnName);
static final int INDEX_NOT_FOUND = -1;
/**
* Returns the table
*/
public Table getTable();
/**
* Returns primary keys of table.
*/
public List<String> getPrimaryKeysList();
Table getTable();
/**
* Returns primary keys of table.
*/
public String[] getPrimaryKeys();
List<String> getPrimaryKeysList();
/**
* Returns primary keys of table.
*/
String[] getPrimaryKeys();
/**
* Sets the value by the column name.
@ -41,7 +41,7 @@ public interface UpdateableRow extends Row {
* @param columnName
* @param object
*/
public void setValue(String columnName,Object object);
void setValue(String columnName,Object object);
/**
* Sets the value of the provided SelectItem.
@ -51,8 +51,8 @@ public interface UpdateableRow extends Row {
* null if either the value <i>is</i> null or if no value exists
* that matches the SelectItem.
*/
public void setValue(SelectItem item,Object object);
void setValue(SelectItem item,Object object);
/**
* Shorthand method for setting the value of a SelectItem based on the
* provided column. Invoking this method is equivalent to invoking
@ -61,8 +61,8 @@ public interface UpdateableRow extends Row {
* @param column
* @return the value of the specified column
*/
public void setValue(Column column,Object object);
void setValue(Column column,Object object);
/**
* Sets the value of the row at a given index
*
@ -71,5 +71,5 @@ public interface UpdateableRow extends Row {
* @throws IndexOutOfBoundsException
* if the provided index is out of range
*/
public void setValue(int index,Object object) throws IndexOutOfBoundsException;
void setValue(int index,Object object) throws IndexOutOfBoundsException;
}

View file

@ -15,10 +15,10 @@ public interface UpdateableRowDataContext {
/**
* Gets called by executeQuery from crud to this impl which knows how to return UpdateableRow DataSet.
*/
public DataSet crudExecuteQuery(CrudDataContext crudDataContext,Query query);
DataSet crudExecuteQuery(CrudDataContext crudDataContext,Query query);
/**
* Start the query builder with correct data context for execute call back.
*/
public InitFromBuilder crudCreateQuery(CrudDataContext crudDataContext);
InitFromBuilder crudCreateQuery(CrudDataContext crudDataContext);
}

View file

@ -10,5 +10,5 @@ import org.eobjects.metamodel.DataContext;
*/
public interface DataContextProvider {
public DataContext getDataContext();
DataContext getDataContext();
}

View file

@ -13,5 +13,5 @@ import org.eobjects.metamodel.DataContext;
*/
public interface JndiDataContextLoader {
public DataContext loadDataContext(JndiDataContextLoaderConfig config);
DataContext loadDataContext(JndiDataContextLoaderConfig config);
}

View file

@ -36,5 +36,5 @@ public interface MongodbConnectionProvider {
* Returns a DB connection.
* @return An DB connection to mongodb
*/
public DB getMongodbConnection();
DB getMongodbConnection();
}