code stringlengths 73 34.1k | label stringclasses 1
value |
|---|---|
private boolean isSpecial(final char chr) {
return ((chr == '.') || (chr == '?') || (chr == '*') || (chr == '^') || (chr == '$') || (chr == '+')
|| (chr == '[') || (chr == ']') || (chr == '(') || (chr == ')') || (chr == '|') || (chr == '\\')
|| (chr == '&'));
} | java |
private String fixSpecials(final String inString) {
StringBuilder tmp = new StringBuilder();
for (int i = 0; i < inString.length(); i++) {
char chr = inString.charAt(i);
if (isSpecial(chr)) {
tmp.append(this.escape);
tmp.append(chr);
} else {
tmp.append(chr);
}
}
return tmp.toString()... | java |
protected PreparedStatement prepareStatement(Connection con,
String sql,
boolean scrollable,
boolean createPreparedStatement,
... | java |
private Statement createStatement(Connection con, boolean scrollable, int explicitFetchSizeHint)
throws java.sql.SQLException
{
Statement result;
try
{
// if necessary use JDBC1.0 methods
if (!FORCEJDBC1_0)
{
result =
... | java |
public int compareTo(InternalFeature o) {
if (null == o) {
return -1; // avoid NPE, put null objects at the end
}
if (null != styleDefinition && null != o.getStyleInfo()) {
if (styleDefinition.getIndex() > o.getStyleInfo().getIndex()) {
return 1;
}
if (styleDefinition.getIndex() < o.getStyleInfo()... | java |
public final void begin() {
this.file = this.getAppender().getIoFile();
if (this.file == null) {
this.getAppender().getErrorHandler()
.error("Scavenger not started: missing log file name");
return;
}
if (this.getProperties().getScavengeInterval() > -1) {
final Thread thread =... | java |
public final void end() {
final Thread thread = threadRef;
if (thread != null) {
thread.interrupt();
try {
thread.join();
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
}
this.threadRef = null;
} | java |
public static boolean isPropertyAllowed(Class defClass, String propertyName)
{
HashMap props = (HashMap)_properties.get(defClass);
return (props == null ? true : props.containsKey(propertyName));
} | java |
public static boolean toBoolean(String value, boolean defaultValue)
{
return "true".equals(value) ? true : ("false".equals(value) ? false : defaultValue);
} | java |
protected FieldDescriptor getFieldDescriptor(TableAlias aTableAlias, PathInfo aPathInfo)
{
FieldDescriptor fld = null;
String colName = aPathInfo.column;
if (aTableAlias != null)
{
fld = aTableAlias.cld.getFieldDescriptorByName(colName);
if (fld == nu... | java |
private FieldDescriptor getFldFromJoin(TableAlias aTableAlias, String aColName)
{
FieldDescriptor fld = null;
// Search Join Structure for attribute
if (aTableAlias.joins != null)
{
Iterator itr = aTableAlias.joins.iterator();
while (itr.hasNext())
... | java |
private FieldDescriptor getFldFromReference(TableAlias aTableAlias, ObjectReferenceDescriptor anOrd)
{
FieldDescriptor fld = null;
if (aTableAlias == getRoot())
{
// no path expression
FieldDescriptor[] fk = anOrd.getForeignKeyFieldDescriptors(aTableAlias.cld)... | java |
protected void ensureColumns(List columns, List existingColumns)
{
if (columns == null || columns.isEmpty())
{
return;
}
Iterator iter = columns.iterator();
while (iter.hasNext())
{
FieldHelper cf = (FieldHelper) iter.next(... | java |
protected void appendWhereClause(StringBuffer where, Criteria crit, StringBuffer stmt)
{
if (where.length() == 0)
{
where = null;
}
if (where != null || (crit != null && !crit.isEmpty()))
{
stmt.append(" WHERE ");
appendClause(wh... | java |
protected void appendHavingClause(StringBuffer having, Criteria crit, StringBuffer stmt)
{
if (having.length() == 0)
{
having = null;
}
if (having != null || crit != null)
{
stmt.append(" HAVING ");
appendClause(having, crit, stm... | java |
private void appendBetweenCriteria(TableAlias alias, PathInfo pathInfo, BetweenCriteria c, StringBuffer buf)
{
appendColName(alias, pathInfo, c.isTranslateAttribute(), buf);
buf.append(c.getClause());
appendParameter(c.getValue(), buf);
buf.append(" AND ");
appendParame... | java |
private String getIndirectionTableColName(TableAlias mnAlias, String path)
{
int dotIdx = path.lastIndexOf(".");
String column = path.substring(dotIdx);
return mnAlias.alias + column;
} | java |
private void appendLikeCriteria(TableAlias alias, PathInfo pathInfo, LikeCriteria c, StringBuffer buf)
{
appendColName(alias, pathInfo, c.isTranslateAttribute(), buf);
buf.append(c.getClause());
appendParameter(c.getValue(), buf);
buf.append(m_platform.getEscapeClause(c));
... | java |
protected void appendSQLClause(SelectionCriteria c, StringBuffer buf)
{
// BRJ : handle SqlCriteria
if (c instanceof SqlCriteria)
{
buf.append(c.getAttribute());
return;
}
// BRJ : criteria attribute is a query
if (c.getAttri... | java |
private void appendParameter(Object value, StringBuffer buf)
{
if (value instanceof Query)
{
appendSubQuery((Query) value, buf);
}
else
{
buf.append("?");
}
} | java |
private void appendSubQuery(Query subQuery, StringBuffer buf)
{
buf.append(" (");
buf.append(getSubQuerySQL(subQuery));
buf.append(") ");
} | java |
private String getSubQuerySQL(Query subQuery)
{
ClassDescriptor cld = getRoot().cld.getRepository().getDescriptorFor(subQuery.getSearchClass());
String sql;
if (subQuery instanceof QueryBySQL)
{
sql = ((QueryBySQL) subQuery).getSql();
}
else
... | java |
private void addJoin(TableAlias left, Object[] leftKeys, TableAlias right, Object[] rightKeys, boolean outer,
String name)
{
TableAlias extAlias, rightCopy;
left.addJoin(new Join(left, leftKeys, right, rightKeys, outer, name));
// build join between left and extents of r... | java |
private FieldDescriptor[] getExtentFieldDescriptors(TableAlias extAlias, FieldDescriptor[] fds)
{
FieldDescriptor[] result = new FieldDescriptor[fds.length];
for (int i = 0; i < fds.length; i++)
{
result[i] = extAlias.cld.getFieldDescriptorByName(fds[i].getAttributeName())... | java |
private TableAlias createTableAlias(String aTable, String aPath, String aUserAlias)
{
if (aUserAlias == null)
{
return createTableAlias(aTable, aPath);
}
else
{
return createTableAlias(aTable, aUserAlias + ALIAS_SEPARATOR + aPath);
}
} | java |
private TableAlias getTableAliasForPath(String aPath, List hintClasses)
{
return (TableAlias) m_pathToAlias.get(buildAliasKey(aPath, hintClasses));
} | java |
private void setTableAliasForPath(String aPath, List hintClasses, TableAlias anAlias)
{
m_pathToAlias.put(buildAliasKey(aPath, hintClasses), anAlias);
} | java |
private String buildAliasKey(String aPath, List hintClasses)
{
if (hintClasses == null || hintClasses.isEmpty())
{
return aPath;
}
StringBuffer buf = new StringBuffer(aPath);
for (Iterator iter = hintClasses.iterator(); iter.hasNext();)
{... | java |
private void setTableAliasForClassDescriptor(ClassDescriptor aCld, TableAlias anAlias)
{
if (m_cldToAlias.get(aCld) == null)
{
m_cldToAlias.put(aCld, anAlias);
}
} | java |
private TableAlias getTableAliasForPath(String aPath, String aUserAlias, List hintClasses)
{
if (aUserAlias == null)
{
return getTableAliasForPath(aPath, hintClasses);
}
else
{
return getTableAliasForPath(aUserAlias + ALIAS_SEPARATOR + aPath, hintClasse... | java |
protected void appendGroupByClause(List groupByFields, StringBuffer buf)
{
if (groupByFields == null || groupByFields.size() == 0)
{
return;
}
buf.append(" GROUP BY ");
for (int i = 0; i < groupByFields.size(); i++)
{
FieldHelper cf ... | java |
protected void appendTableWithJoins(TableAlias alias, StringBuffer where, StringBuffer buf)
{
int stmtFromPos = 0;
byte joinSyntax = getJoinSyntaxType();
if (joinSyntax == SQL92_JOIN_SYNTAX)
{
stmtFromPos = buf.length(); // store position of join (by: Terry Dexter... | java |
private void appendJoin(StringBuffer where, StringBuffer buf, Join join)
{
buf.append(",");
appendTableWithJoins(join.right, where, buf);
if (where.length() > 0)
{
where.append(" AND ");
}
join.appendJoinEqualities(where);
} | java |
private void appendJoinSQL92(Join join, StringBuffer where, StringBuffer buf)
{
if (join.isOuter)
{
buf.append(" LEFT OUTER JOIN ");
}
else
{
buf.append(" INNER JOIN ");
}
if (join.right.hasJoins())
{
buf... | java |
private void appendJoinSQL92NoParen(Join join, StringBuffer where, StringBuffer buf)
{
if (join.isOuter)
{
buf.append(" LEFT OUTER JOIN ");
}
else
{
buf.append(" INNER JOIN ");
}
buf.append(join.right.getTableAndAlias());
... | java |
private void buildJoinTree(Criteria crit)
{
Enumeration e = crit.getElements();
while (e.hasMoreElements())
{
Object o = e.nextElement();
if (o instanceof Criteria)
{
buildJoinTree((Criteria) o);
}
else
... | java |
protected void buildSuperJoinTree(TableAlias left, ClassDescriptor cld, String name, boolean useOuterJoin)
{
ClassDescriptor superCld = cld.getSuperClassDescriptor();
if (superCld != null)
{
SuperReferenceDescriptor superRef = cld.getSuperReference();
FieldDescr... | java |
private void buildMultiJoinTree(TableAlias left, ClassDescriptor cld, String name, boolean useOuterJoin)
{
DescriptorRepository repository = cld.getRepository();
Class[] multiJoinedClasses = repository.getSubClassesMultipleJoinedTables(cld, false);
for (int i = 0; i < multiJoinedClasse... | java |
protected void splitCriteria()
{
Criteria whereCrit = getQuery().getCriteria();
Criteria havingCrit = getQuery().getHavingCriteria();
if (whereCrit == null || whereCrit.isEmpty())
{
getJoinTreeToCriteria().put(getRoot(), null);
}
else
{
... | java |
private Filter getFilter(String layerFilter, String[] featureIds) throws GeomajasException {
Filter filter = null;
if (null != layerFilter) {
filter = filterService.parseFilter(layerFilter);
}
if (null != featureIds) {
Filter fidFilter = filterService.createFidFilter(featureIds);
if (null == filter) {
... | java |
public static String resolveProxyUrl(String relativeUrl, TileMap tileMap, String baseTmsUrl) {
TileCode tc = parseTileCode(relativeUrl);
return buildUrl(tc, tileMap, baseTmsUrl);
} | java |
public AbstractGraph getModuleGraph(final String moduleId) {
final ModuleHandler moduleHandler = new ModuleHandler(repoHandler);
final DbModule module = moduleHandler.getModule(moduleId);
final DbOrganization organization = moduleHandler.getOrganization(module);
filters.setCorporateFilt... | java |
private void addModuleToGraph(final DbModule module, final AbstractGraph graph, final int depth) {
if (graph.isTreated(graph.getId(module))) {
return;
}
final String moduleElementId = graph.getId(module);
graph.addElement(moduleElementId, module.getVersion(), depth == 0);
... | java |
private void addDependencyToGraph(final DbDependency dependency, final AbstractGraph graph, final int depth, final String parentId) {
// In that case of Axway artifact we will add a module to the graph
if (filters.getCorporateFilter().filter(dependency)) {
final DbModule dbTarget = repoHandl... | java |
public TreeNode getModuleTree(final String moduleId) {
final ModuleHandler moduleHandler = new ModuleHandler(repoHandler);
final DbModule module = moduleHandler.getModule(moduleId);
final TreeNode tree = new TreeNode();
tree.setName(module.getName());
// Add submodules
... | java |
private void addModuleToTree(final DbModule module, final TreeNode tree) {
final TreeNode subTree = new TreeNode();
subTree.setName(module.getName());
tree.addChild(subTree);
// Add SubsubModules
for (final DbModule subsubmodule : module.getSubmodules()) {
addModuleT... | java |
public static void main(String[] args) throws Exception {
Logger logger = Logger.getLogger("MASReader.main");
Properties beastConfigProperties = new Properties();
String beastConfigPropertiesFile = null;
if (args.length > 0) {
beastConfigPropertiesFile = args[0];
... | java |
private synchronized Constructor getIndirectionHandlerConstructor()
{
if(_indirectionHandlerConstructor == null)
{
Class[] paramType = {PBKey.class, Identity.class};
try
{
_indirectionHandlerConstructor = getIndirectionHandlerClass().getCo... | java |
public void setIndirectionHandlerClass(Class indirectionHandlerClass)
{
if(indirectionHandlerClass == null)
{
//throw new MetadataException("No IndirectionHandlerClass specified.");
/**
* andrew.clute
* Allow the default IndirectionHandler for... | java |
public IndirectionHandler createIndirectionHandler(PBKey brokerKey, Identity id)
{
Object args[] = {brokerKey, id};
try
{
return (IndirectionHandler) getIndirectionHandlerConstructor().newInstance(args);
}
catch(InvocationTargetException ex)
{
... | java |
private static Constructor retrieveCollectionProxyConstructor(Class proxyClass, Class baseType, String typeDesc)
{
if(proxyClass == null)
{
throw new MetadataException("No " + typeDesc + " specified.");
}
if(proxyClass.isInterface() || Modifier.isAbstract(proxyClass... | java |
public ManageableCollection createCollectionProxy(PBKey brokerKey, Query query, Class collectionClass)
{
Object args[] = {brokerKey, collectionClass, query};
try
{
return (ManageableCollection) getCollectionProxyConstructor(collectionClass).newInstance(args);
}
... | java |
public final Object getRealObject(Object objectOrProxy)
{
if(isNormalOjbProxy(objectOrProxy))
{
String msg;
try
{
return getIndirectionHandler(objectOrProxy).getRealSubject();
}
catch(ClassCastException e)
... | java |
public Object getRealObjectIfMaterialized(Object objectOrProxy)
{
if(isNormalOjbProxy(objectOrProxy))
{
String msg;
try
{
IndirectionHandler handler = getIndirectionHandler(objectOrProxy);
return handler.alreadyMateriali... | java |
public Class getRealClass(Object objectOrProxy)
{
IndirectionHandler handler;
if(isNormalOjbProxy(objectOrProxy))
{
String msg;
try
{
handler = getIndirectionHandler(objectOrProxy);
/*
arminw:
... | java |
public IndirectionHandler getIndirectionHandler(Object obj)
{
if(obj == null)
{
return null;
}
else if(isNormalOjbProxy(obj))
{
return getDynamicIndirectionHandler(obj);
}
else if(isVirtualOjbProxy(obj))
{
... | java |
public boolean isMaterialized(Object object)
{
IndirectionHandler handler = getIndirectionHandler(object);
return handler == null || handler.alreadyMaterialized();
} | java |
public DbOrganization getOrganization(final String organizationId) {
final DbOrganization dbOrganization = repositoryHandler.getOrganization(organizationId);
if(dbOrganization == null){
throw new WebApplicationException(Response.status(Response.Status.NOT_FOUND)
.entity(... | java |
public void deleteOrganization(final String organizationId) {
final DbOrganization dbOrganization = getOrganization(organizationId);
repositoryHandler.deleteOrganization(dbOrganization.getName());
repositoryHandler.removeModulesOrganization(dbOrganization);
} | java |
public List<String> getCorporateGroupIds(final String organizationId) {
final DbOrganization dbOrganization = getOrganization(organizationId);
return dbOrganization.getCorporateGroupIdPrefixes();
} | java |
public void addCorporateGroupId(final String organizationId, final String corporateGroupId) {
final DbOrganization dbOrganization = getOrganization(organizationId);
if(!dbOrganization.getCorporateGroupIdPrefixes().contains(corporateGroupId)){
dbOrganization.getCorporateGroupIdPrefixes().add... | java |
public void removeCorporateGroupId(final String organizationId, final String corporateGroupId) {
final DbOrganization dbOrganization = getOrganization(organizationId);
if(dbOrganization.getCorporateGroupIdPrefixes().contains(corporateGroupId)){
dbOrganization.getCorporateGroupIdPrefixes().r... | java |
public DbOrganization getMatchingOrganization(final DbModule dbModule) {
if(dbModule.getOrganization() != null
&& !dbModule.getOrganization().isEmpty()){
return getOrganization(dbModule.getOrganization());
}
for(final DbOrganization organization: repositoryHandler.ge... | java |
public void executeDelete(ClassDescriptor cld, Object obj) throws PersistenceBrokerException
{
if (logger.isDebugEnabled())
{
logger.debug("executeDelete: " + obj);
}
final StatementManagerIF sm = broker.serviceStatementManager();
PreparedStatement stmt =... | java |
public void executeInsert(ClassDescriptor cld, Object obj) throws PersistenceBrokerException
{
if (logger.isDebugEnabled())
{
logger.debug("executeInsert: " + obj);
}
final StatementManagerIF sm = broker.serviceStatementManager();
PreparedStatement stmt = n... | java |
public ResultSetAndStatement executeQuery(Query query, ClassDescriptor cld) throws PersistenceBrokerException
{
if (logger.isDebugEnabled())
{
logger.debug("executeQuery: " + query);
}
/*
* MBAIRD: we should create a scrollable resultset if the start at
* in... | java |
public ResultSetAndStatement executeSQL(
final String sql,
ClassDescriptor cld,
ValueContainer[] values,
boolean scrollable)
throws PersistenceBrokerException
{
if (logger.isDebugEnabled()) logger.debug("executeSQL: " + sql);
final boolean isStoredproc... | java |
public int executeUpdateSQL(
String sqlStatement,
ClassDescriptor cld,
ValueContainer[] values1,
ValueContainer[] values2)
throws PersistenceBrokerException
{
if (logger.isDebugEnabled())
logger.debug("executeUpdateSQL: " + sqlStatement);
... | java |
public void executeUpdate(ClassDescriptor cld, Object obj) throws PersistenceBrokerException
{
if (logger.isDebugEnabled())
{
logger.debug("executeUpdate: " + obj);
}
// obj with nothing but key fields is not updated
if (cld.getNonPkRwFields().length == 0... | java |
public Object materializeObject(ClassDescriptor cld, Identity oid)
throws PersistenceBrokerException
{
final StatementManagerIF sm = broker.serviceStatementManager();
final SelectStatement sql = broker.serviceSqlGenerator().getPreparedSelectByPkStatement(cld);
Object result = nu... | java |
private void setLockingValues(ClassDescriptor cld, Object obj, ValueContainer[] oldLockingValues)
{
FieldDescriptor fields[] = cld.getLockingFields();
for (int i=0; i<fields.length; i++)
{
PersistentField field = fields[i].getPersistentField();
Object lockVal ... | java |
private void harvestReturnValues(
ProcedureDescriptor proc,
Object obj,
PreparedStatement stmt)
throws PersistenceBrokerSQLException
{
// If the procedure descriptor is null or has no return values or
// if the statement is not a callable statment, then we're d... | java |
private void harvestReturnValue(
Object obj,
CallableStatement callable,
FieldDescriptor fmd,
int index)
throws PersistenceBrokerSQLException
{
try
{
// If we have a field descriptor, then we can harvest
// the return value.... | java |
protected boolean isStoredProcedure(String sql)
{
/*
Stored procedures start with
{?= call <procedure-name>[<arg1>,<arg2>, ...]}
or
{call <procedure-name>[<arg1>,<arg2>, ...]}
but also statements with white space like
{ ?= call <procedure-name>[<arg1>,... | java |
public String get() {
synchronized (LOCK) {
if (!initialised) {
// generate the random number
Random rnd = new Random(); // @todo need a different seed, this is now time based and I
// would prefer something different, like an object address
// get the random number, instead of getting an integer a... | java |
public boolean removeReader(Object key, Object resourceId)
{
boolean result = false;
ObjectLocks objectLocks = null;
synchronized(locktable)
{
objectLocks = (ObjectLocks) locktable.get(resourceId);
if(objectLocks != null)
{
... | java |
public boolean removeWriter(Object key, Object resourceId)
{
boolean result = false;
ObjectLocks objectLocks = null;
synchronized(locktable)
{
objectLocks = (ObjectLocks) locktable.get(resourceId);
if(objectLocks != null)
{
... | java |
private List<StyleFilter> initStyleFilters(List<FeatureStyleInfo> styleDefinitions) throws GeomajasException {
List<StyleFilter> styleFilters = new ArrayList<StyleFilter>();
if (styleDefinitions == null || styleDefinitions.size() == 0) {
styleFilters.add(new StyleFilterImpl()); // use default.
} else {
for ... | java |
public static List<Artifact> getAllArtifacts(final Module module){
final List<Artifact> artifacts = new ArrayList<Artifact>();
for(final Module subModule: module.getSubmodules()){
artifacts.addAll(getAllArtifacts(subModule));
}
artifacts.addAll(module.getArtifacts());
... | java |
public static List<Dependency> getAllDependencies(final Module module) {
final Set<Dependency> dependencies = new HashSet<Dependency>();
final List<String> producedArtifacts = new ArrayList<String>();
for(final Artifact artifact: getAllArtifacts(module)){
producedArtifacts.add(artifa... | java |
public static Set<Dependency> getAllDependencies(final Module module, final List<String> producedArtifacts) {
final Set<Dependency> dependencies = new HashSet<Dependency>();
for(final Dependency dependency: module.getDependencies()){
if(!producedArtifacts.contains(dependency.getTarget().get... | java |
public static List<Dependency> getCorporateDependencies(final Module module, final List<String> corporateFilters) {
final List<Dependency> corporateDependencies = new ArrayList<Dependency>();
final Pattern corporatePattern = generateCorporatePattern(corporateFilters);
for(final Dependency depen... | java |
protected boolean _load ()
{
java.sql.ResultSet rs = null;
try
{
// This synchronization is necessary for Oracle JDBC drivers 8.1.7, 9.0.1, 9.2.0.1
// The documentation says synchronization is done within the driver, but they
// must have overlooked... | java |
private void configureCaching(HttpServletResponse response, int seconds) {
// HTTP 1.0 header
response.setDateHeader(HTTP_EXPIRES_HEADER, System.currentTimeMillis() + seconds * 1000L);
if (seconds > 0) {
// HTTP 1.1 header
response.setHeader(HTTP_CACHE_CONTROL_HEADER, "max-age=" + seconds);
} else {
//... | java |
public int compare(Object objA, Object objB)
{
String idAStr = ((FieldDescriptorDef)_fields.get(objA)).getProperty("id");
String idBStr = ((FieldDescriptorDef)_fields.get(objB)).getProperty("id");
int idA;
int idB;
try
{
idA = Integer.parse... | java |
public boolean hasMoreElements()
{
try
{
if (!hasCalledCheck)
{
hasCalledCheck = true;
hasNext = resultSetAndStatment.m_rs.next();
}
}
catch (SQLException e)
{
LoggerFactory.getDefault... | java |
@RequestMapping(value = "/legendgraphic", method = RequestMethod.GET)
public ModelAndView getGraphic(@RequestParam("layerId") String layerId,
@RequestParam(value = "styleName", required = false) String styleName,
@RequestParam(value = "ruleIndex", required = false) Integer ruleIndex,
@RequestParam(value = "fo... | java |
public boolean checkRead(TransactionImpl tx, Object obj)
{
if (hasReadLock(tx, obj))
{
return true;
}
LockEntry writer = getWriter(obj);
if (writer.isOwnedBy(tx))
{
return true;
}
return false;
} | java |
public boolean checkWrite(TransactionImpl tx, Object obj)
{
LockEntry writer = getWriter(obj);
if (writer == null)
return false;
else if (writer.isOwnedBy(tx))
return true;
else
return false;
} | java |
private Class getDynamicProxyClass(Class baseClass) {
Class[] m_dynamicProxyClassInterfaces;
if (foundInterfaces.containsKey(baseClass)) {
m_dynamicProxyClassInterfaces = (Class[])foundInterfaces.get(baseClass);
} else {
m_dynamicProxyClassInterfaces = getInterfaces(... | java |
private Class[] getInterfaces(Class clazz) {
Class superClazz = clazz;
Class[] interfaces = clazz.getInterfaces();
// clazz can be an interface itself and when getInterfaces()
// is called on an interface it returns only the extending
// interfaces, not the interface itsel... | java |
public Object getRealKey()
{
if(keyRealSubject != null)
{
return keyRealSubject;
}
else
{
TransactionExt tx = getTransaction();
if((tx != null) && tx.isOpen())
{
prepareKeyRealSubject(tx.getBroker())... | java |
public Object getRealValue()
{
if(valueRealSubject != null)
{
return valueRealSubject;
}
else
{
TransactionExt tx = getTransaction();
if((tx != null) && tx.isOpen())
{
prepareValueRealSubject(tx.getB... | java |
private Object readMetadataFromXML(InputSource source, Class target)
throws MalformedURLException, ParserConfigurationException, SAXException, IOException
{
// TODO: make this configurable
boolean validate = false;
// get a xml reader instance:
SAXParserFa... | java |
public Criteria copy(boolean includeGroupBy, boolean includeOrderBy, boolean includePrefetchedRelationships)
{
Criteria copy = new Criteria();
copy.m_criteria = new Vector(this.m_criteria);
copy.m_negative = this.m_negative;
if (includeGroupBy)
{
copy.g... | java |
protected List splitInCriteria(Object attribute, Collection values, boolean negative, int inLimit)
{
List result = new ArrayList();
Collection inCollection = new ArrayList();
if (values == null || values.isEmpty())
{
// OQL creates empty Criteria for late binding
... | java |
List getOrderby()
{
List result = _getOrderby();
Iterator iter = getCriteria().iterator();
Object crit;
while (iter.hasNext())
{
crit = iter.next();
if (crit instanceof Criteria)
{
result.addAll(((Criteria) crit)... | java |
public void addColumnIsNull(String column)
{
// PAW
//SelectionCriteria c = ValueCriteria.buildNullCriteria(column, getAlias());
SelectionCriteria c = ValueCriteria.buildNullCriteria(column, getUserAlias(column));
c.setTranslateAttribute(false);
addSelectionCriteria(c);
} | java |
public void addColumnNotNull(String column)
{
// PAW
// SelectionCriteria c = ValueCriteria.buildNotNullCriteria(column, getAlias());
SelectionCriteria c = ValueCriteria.buildNotNullCriteria(column, getUserAlias(column));
c.setTranslateAttribute(false);
addSelectionCriteria(c);
} | java |
public void addBetween(Object attribute, Object value1, Object value2)
{
// PAW
// addSelectionCriteria(ValueCriteria.buildBeweenCriteria(attribute, value1, value2, getAlias()));
addSelectionCriteria(ValueCriteria.buildBeweenCriteria(attribute, value1, value2, getUserAlias(attribute)));
} | java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.