com.jpattern.orm.crud.OrmCRUDQuery Maven / Gradle / Ivy
package com.jpattern.orm.crud;
/**
*
* @author Francesco Cina
*
* 22/mag/2011
*/
public class OrmCRUDQuery implements CRUDQuery {
private String updateQuery;
private String deleteQuery;
private String loadQuery;
private String saveQuery;
private String baseSelectClause;
private String baseFromClause;
private String beanVersionQuery;
private String saveQueryWithoutGenerators;
@Override
public String getLoadQuery() {
return loadQuery;
}
@Override
public String getSaveQuery() {
return saveQuery;
}
@Override
public String getDeleteQuery() {
return deleteQuery;
}
@Override
public String getUpdateQuery() {
return updateQuery;
}
@Override
public String getBaseSelectClause() {
return getBaseSelectClause(getBaseFromClause() + ".");
}
@Override
public String getBaseFromClause() {
return baseFromClause;
}
@Override
public String getBaseSelectClause(String rowNamePrefix) {
return baseSelectClause.replaceAll("\\" + OrmCrudConstants.ROW_NAME_PREFIX_PLACEHOLDER, rowNamePrefix);
}
@Override
public String getBeanVersionQuery() {
return beanVersionQuery;
}
@Override
public String getSaveQueryWithoutGenerators() {
return saveQueryWithoutGenerators;
}
/**
* @param updateQuery the updateQuery to set
*/
public void setUpdateQuery(String updateQuery) {
this.updateQuery = updateQuery;
}
/**
* @param deleteQuery the deleteQuery to set
*/
public void setDeleteQuery(String deleteQuery) {
this.deleteQuery = deleteQuery;
}
/**
* @param loadQuery the loadQuery to set
*/
public void setLoadQuery(String loadQuery) {
this.loadQuery = loadQuery;
}
/**
* @param saveQuery the saveQuery to set
*/
public void setSaveQuery(String saveQuery) {
this.saveQuery = saveQuery;
}
/**
* @param baseSelectClause the baseSelectClause to set
*/
public void setBaseSelectClause(String baseSelectClause) {
this.baseSelectClause = baseSelectClause;
}
/**
* @param baseFromClause the baseFromClause to set
*/
public void setBaseFromClause(String baseFromClause) {
this.baseFromClause = baseFromClause;
}
/**
* @param beanVersionQuery the beanVersionQuery to set
*/
public void setBeanVersionQuery(String beanVersionQuery) {
this.beanVersionQuery = beanVersionQuery;
}
/**
* @param saveQueryWithoutGenerators the saveQueryWithoutGenerators to set
*/
public void setSaveQueryWithoutGenerators(String saveQueryWithoutGenerators) {
this.saveQueryWithoutGenerators = saveQueryWithoutGenerators;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy