repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 | partition stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/util/ReferenceMap.java | ReferenceMap.values | public Collection values()
{
if (values != null) return values;
values = new AbstractCollection()
{
public int size()
{
return size;
}
public void clear()
{
ReferenceMap.this.clear();
... | java | public Collection values()
{
if (values != null) return values;
values = new AbstractCollection()
{
public int size()
{
return size;
}
public void clear()
{
ReferenceMap.this.clear();
... | [
"public",
"Collection",
"values",
"(",
")",
"{",
"if",
"(",
"values",
"!=",
"null",
")",
"return",
"values",
";",
"values",
"=",
"new",
"AbstractCollection",
"(",
")",
"{",
"public",
"int",
"size",
"(",
")",
"{",
"return",
"size",
";",
"}",
"public",
... | Returns a collection view of this map's values.
@return a collection view of this map's values. | [
"Returns",
"a",
"collection",
"view",
"of",
"this",
"map",
"s",
"values",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/util/ReferenceMap.java#L737-L758 | train |
geomajas/geomajas-project-server | impl/src/main/java/org/geomajas/internal/service/DtoConverterServiceImpl.java | DtoConverterServiceImpl.toInternal | public Object toInternal(Attribute<?> attribute) throws GeomajasException {
if (attribute instanceof PrimitiveAttribute<?>) {
return toPrimitiveObject((PrimitiveAttribute<?>) attribute);
} else if (attribute instanceof AssociationAttribute<?>) {
return toAssociationObject((AssociationAttribute<?>) attribute);... | java | public Object toInternal(Attribute<?> attribute) throws GeomajasException {
if (attribute instanceof PrimitiveAttribute<?>) {
return toPrimitiveObject((PrimitiveAttribute<?>) attribute);
} else if (attribute instanceof AssociationAttribute<?>) {
return toAssociationObject((AssociationAttribute<?>) attribute);... | [
"public",
"Object",
"toInternal",
"(",
"Attribute",
"<",
"?",
">",
"attribute",
")",
"throws",
"GeomajasException",
"{",
"if",
"(",
"attribute",
"instanceof",
"PrimitiveAttribute",
"<",
"?",
">",
")",
"{",
"return",
"toPrimitiveObject",
"(",
"(",
"PrimitiveAttri... | Converts a DTO attribute into a generic attribute object.
@param attribute
The DTO attribute.
@return The server side attribute representation. As we don't know at this point what kind of object the
attribute is (that's a problem for the <code>FeatureModel</code>), we return an <code>Object</code>. | [
"Converts",
"a",
"DTO",
"attribute",
"into",
"a",
"generic",
"attribute",
"object",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/impl/src/main/java/org/geomajas/internal/service/DtoConverterServiceImpl.java#L97-L105 | train |
geomajas/geomajas-project-server | impl/src/main/java/org/geomajas/internal/service/DtoConverterServiceImpl.java | DtoConverterServiceImpl.toDto | public Feature toDto(InternalFeature feature, int featureIncludes) throws GeomajasException {
if (feature == null) {
return null;
}
Feature dto = new Feature(feature.getId());
if ((featureIncludes & VectorLayerService.FEATURE_INCLUDE_ATTRIBUTES) != 0 && null != feature.getAttributes()) {
// need to assure... | java | public Feature toDto(InternalFeature feature, int featureIncludes) throws GeomajasException {
if (feature == null) {
return null;
}
Feature dto = new Feature(feature.getId());
if ((featureIncludes & VectorLayerService.FEATURE_INCLUDE_ATTRIBUTES) != 0 && null != feature.getAttributes()) {
// need to assure... | [
"public",
"Feature",
"toDto",
"(",
"InternalFeature",
"feature",
",",
"int",
"featureIncludes",
")",
"throws",
"GeomajasException",
"{",
"if",
"(",
"feature",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"Feature",
"dto",
"=",
"new",
"Feature",
"(",
... | Convert the server side feature to a DTO feature that can be sent to the client.
@param feature
The server-side feature representation.
@param featureIncludes
Indicate which aspects of the should be included see {@link VectorLayerService}
@return Returns the DTO feature. | [
"Convert",
"the",
"server",
"side",
"feature",
"to",
"a",
"DTO",
"feature",
"that",
"can",
"be",
"sent",
"to",
"the",
"client",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/impl/src/main/java/org/geomajas/internal/service/DtoConverterServiceImpl.java#L322-L353 | train |
geomajas/geomajas-project-server | impl/src/main/java/org/geomajas/internal/service/DtoConverterServiceImpl.java | DtoConverterServiceImpl.toInternal | public Class<? extends com.vividsolutions.jts.geom.Geometry> toInternal(LayerType layerType) {
switch (layerType) {
case GEOMETRY:
return com.vividsolutions.jts.geom.Geometry.class;
case LINESTRING:
return LineString.class;
case MULTILINESTRING:
return MultiLineString.class;
case POINT:
re... | java | public Class<? extends com.vividsolutions.jts.geom.Geometry> toInternal(LayerType layerType) {
switch (layerType) {
case GEOMETRY:
return com.vividsolutions.jts.geom.Geometry.class;
case LINESTRING:
return LineString.class;
case MULTILINESTRING:
return MultiLineString.class;
case POINT:
re... | [
"public",
"Class",
"<",
"?",
"extends",
"com",
".",
"vividsolutions",
".",
"jts",
".",
"geom",
".",
"Geometry",
">",
"toInternal",
"(",
"LayerType",
"layerType",
")",
"{",
"switch",
"(",
"layerType",
")",
"{",
"case",
"GEOMETRY",
":",
"return",
"com",
".... | Convert a layer type to a geometry class.
@param layerType
layer type
@return JTS class | [
"Convert",
"a",
"layer",
"type",
"to",
"a",
"geometry",
"class",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/impl/src/main/java/org/geomajas/internal/service/DtoConverterServiceImpl.java#L478-L499 | train |
geomajas/geomajas-project-server | impl/src/main/java/org/geomajas/internal/service/DtoConverterServiceImpl.java | DtoConverterServiceImpl.toDto | public LayerType toDto(Class<? extends com.vividsolutions.jts.geom.Geometry> geometryClass) {
if (geometryClass == LineString.class) {
return LayerType.LINESTRING;
} else if (geometryClass == MultiLineString.class) {
return LayerType.MULTILINESTRING;
} else if (geometryClass == Point.class) {
return Laye... | java | public LayerType toDto(Class<? extends com.vividsolutions.jts.geom.Geometry> geometryClass) {
if (geometryClass == LineString.class) {
return LayerType.LINESTRING;
} else if (geometryClass == MultiLineString.class) {
return LayerType.MULTILINESTRING;
} else if (geometryClass == Point.class) {
return Laye... | [
"public",
"LayerType",
"toDto",
"(",
"Class",
"<",
"?",
"extends",
"com",
".",
"vividsolutions",
".",
"jts",
".",
"geom",
".",
"Geometry",
">",
"geometryClass",
")",
"{",
"if",
"(",
"geometryClass",
"==",
"LineString",
".",
"class",
")",
"{",
"return",
"... | Convert a geometry class to a layer type.
@param geometryClass
JTS geometry class
@return Geomajas layer type | [
"Convert",
"a",
"geometry",
"class",
"to",
"a",
"layer",
"type",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/impl/src/main/java/org/geomajas/internal/service/DtoConverterServiceImpl.java#L508-L524 | train |
geomajas/geomajas-project-server | plugin/cache/cache/src/main/java/org/geomajas/plugin/caching/service/IndexedCache.java | IndexedCache.put | public void put(String key, Object object, Envelope envelope) {
index.put(key, envelope);
cache.put(key, object);
} | java | public void put(String key, Object object, Envelope envelope) {
index.put(key, envelope);
cache.put(key, object);
} | [
"public",
"void",
"put",
"(",
"String",
"key",
",",
"Object",
"object",
",",
"Envelope",
"envelope",
")",
"{",
"index",
".",
"put",
"(",
"key",
",",
"envelope",
")",
";",
"cache",
".",
"put",
"(",
"key",
",",
"object",
")",
";",
"}"
] | Put a spatial object in the cache and index it.
@param key key for object
@param object object itself
@param envelope envelope for object | [
"Put",
"a",
"spatial",
"object",
"in",
"the",
"cache",
"and",
"index",
"it",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/plugin/cache/cache/src/main/java/org/geomajas/plugin/caching/service/IndexedCache.java#L44-L47 | train |
geomajas/geomajas-project-server | plugin/cache/cache/src/main/java/org/geomajas/plugin/caching/service/IndexedCache.java | IndexedCache.get | public <TYPE> TYPE get(String key, Class<TYPE> type) {
return cache.get(key, type);
} | java | public <TYPE> TYPE get(String key, Class<TYPE> type) {
return cache.get(key, type);
} | [
"public",
"<",
"TYPE",
">",
"TYPE",
"get",
"(",
"String",
"key",
",",
"Class",
"<",
"TYPE",
">",
"type",
")",
"{",
"return",
"cache",
".",
"get",
"(",
"key",
",",
"type",
")",
";",
"}"
] | Get the spatial object from the cache.
@param key key to get object for
@param type type of object which should be returned
@return object for key or null if object does not exist or is a different type | [
"Get",
"the",
"spatial",
"object",
"from",
"the",
"cache",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/plugin/cache/cache/src/main/java/org/geomajas/plugin/caching/service/IndexedCache.java#L56-L58 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/metadata/CollectionDescriptor.java | CollectionDescriptor.addFkToThisClass | public void addFkToThisClass(String column)
{
if (fksToThisClass == null)
{
fksToThisClass = new Vector();
}
fksToThisClass.add(column);
fksToThisClassAry = null;
} | java | public void addFkToThisClass(String column)
{
if (fksToThisClass == null)
{
fksToThisClass = new Vector();
}
fksToThisClass.add(column);
fksToThisClassAry = null;
} | [
"public",
"void",
"addFkToThisClass",
"(",
"String",
"column",
")",
"{",
"if",
"(",
"fksToThisClass",
"==",
"null",
")",
"{",
"fksToThisClass",
"=",
"new",
"Vector",
"(",
")",
";",
"}",
"fksToThisClass",
".",
"add",
"(",
"column",
")",
";",
"fksToThisClass... | add a FK column pointing to This Class | [
"add",
"a",
"FK",
"column",
"pointing",
"to",
"This",
"Class"
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/metadata/CollectionDescriptor.java#L86-L94 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/metadata/CollectionDescriptor.java | CollectionDescriptor.addFkToItemClass | public void addFkToItemClass(String column)
{
if (fksToItemClass == null)
{
fksToItemClass = new Vector();
}
fksToItemClass.add(column);
fksToItemClassAry = null;
} | java | public void addFkToItemClass(String column)
{
if (fksToItemClass == null)
{
fksToItemClass = new Vector();
}
fksToItemClass.add(column);
fksToItemClassAry = null;
} | [
"public",
"void",
"addFkToItemClass",
"(",
"String",
"column",
")",
"{",
"if",
"(",
"fksToItemClass",
"==",
"null",
")",
"{",
"fksToItemClass",
"=",
"new",
"Vector",
"(",
")",
";",
"}",
"fksToItemClass",
".",
"add",
"(",
"column",
")",
";",
"fksToItemClass... | add a FK column pointing to the item Class | [
"add",
"a",
"FK",
"column",
"pointing",
"to",
"the",
"item",
"Class"
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/metadata/CollectionDescriptor.java#L99-L107 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/util/sequence/SequenceManagerStoredProcedureImpl.java | SequenceManagerStoredProcedureImpl.sp_createSequenceQuery | protected String sp_createSequenceQuery(String sequenceName, long maxKey)
{
return "insert into " + SEQ_TABLE_NAME + " ("
+ SEQ_NAME_STRING + "," + SEQ_ID_STRING +
") values ('" + sequenceName + "'," + maxKey + ")";
} | java | protected String sp_createSequenceQuery(String sequenceName, long maxKey)
{
return "insert into " + SEQ_TABLE_NAME + " ("
+ SEQ_NAME_STRING + "," + SEQ_ID_STRING +
") values ('" + sequenceName + "'," + maxKey + ")";
} | [
"protected",
"String",
"sp_createSequenceQuery",
"(",
"String",
"sequenceName",
",",
"long",
"maxKey",
")",
"{",
"return",
"\"insert into \"",
"+",
"SEQ_TABLE_NAME",
"+",
"\" (\"",
"+",
"SEQ_NAME_STRING",
"+",
"\",\"",
"+",
"SEQ_ID_STRING",
"+",
"\") values ('\"",
"... | Insert syntax for our special table
@param sequenceName
@param maxKey
@return sequence insert statement | [
"Insert",
"syntax",
"for",
"our",
"special",
"table"
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/util/sequence/SequenceManagerStoredProcedureImpl.java#L148-L153 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/util/sequence/SequenceManagerStoredProcedureImpl.java | SequenceManagerStoredProcedureImpl.getUniqueLong | protected long getUniqueLong(FieldDescriptor field) throws SequenceManagerException
{
boolean needsCommit = false;
long result = 0;
/*
arminw:
use the associated broker instance, check if broker was in tx or
we need to commit used connection.
*/
... | java | protected long getUniqueLong(FieldDescriptor field) throws SequenceManagerException
{
boolean needsCommit = false;
long result = 0;
/*
arminw:
use the associated broker instance, check if broker was in tx or
we need to commit used connection.
*/
... | [
"protected",
"long",
"getUniqueLong",
"(",
"FieldDescriptor",
"field",
")",
"throws",
"SequenceManagerException",
"{",
"boolean",
"needsCommit",
"=",
"false",
";",
"long",
"result",
"=",
"0",
";",
"/*\r\n arminw:\r\n use the associated broker instance, check if ... | Gets the actual key - will create a new row with the max key of table if it
does not exist.
@param field
@return
@throws SequenceManagerException | [
"Gets",
"the",
"actual",
"key",
"-",
"will",
"create",
"a",
"new",
"row",
"with",
"the",
"max",
"key",
"of",
"table",
"if",
"it",
"does",
"not",
"exist",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/util/sequence/SequenceManagerStoredProcedureImpl.java#L162-L229 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/util/sequence/SequenceManagerStoredProcedureImpl.java | SequenceManagerStoredProcedureImpl.buildNextSequence | protected long buildNextSequence(PersistenceBroker broker, ClassDescriptor cld, String sequenceName)
throws LookupException, SQLException, PlatformException
{
CallableStatement cs = null;
try
{
Connection con = broker.serviceConnectionManager().getConnection();
... | java | protected long buildNextSequence(PersistenceBroker broker, ClassDescriptor cld, String sequenceName)
throws LookupException, SQLException, PlatformException
{
CallableStatement cs = null;
try
{
Connection con = broker.serviceConnectionManager().getConnection();
... | [
"protected",
"long",
"buildNextSequence",
"(",
"PersistenceBroker",
"broker",
",",
"ClassDescriptor",
"cld",
",",
"String",
"sequenceName",
")",
"throws",
"LookupException",
",",
"SQLException",
",",
"PlatformException",
"{",
"CallableStatement",
"cs",
"=",
"null",
";... | Calls the stored procedure stored procedure throws an
error if it doesn't exist.
@param broker
@param cld
@param sequenceName
@return
@throws LookupException
@throws SQLException | [
"Calls",
"the",
"stored",
"procedure",
"stored",
"procedure",
"throws",
"an",
"error",
"if",
"it",
"doesn",
"t",
"exist",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/util/sequence/SequenceManagerStoredProcedureImpl.java#L241-L264 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/util/sequence/SequenceManagerStoredProcedureImpl.java | SequenceManagerStoredProcedureImpl.createSequence | protected void createSequence(PersistenceBroker broker, FieldDescriptor field,
String sequenceName, long maxKey) throws Exception
{
Statement stmt = null;
try
{
stmt = broker.serviceStatementManager().getGenericStatement(field.getClassDescr... | java | protected void createSequence(PersistenceBroker broker, FieldDescriptor field,
String sequenceName, long maxKey) throws Exception
{
Statement stmt = null;
try
{
stmt = broker.serviceStatementManager().getGenericStatement(field.getClassDescr... | [
"protected",
"void",
"createSequence",
"(",
"PersistenceBroker",
"broker",
",",
"FieldDescriptor",
"field",
",",
"String",
"sequenceName",
",",
"long",
"maxKey",
")",
"throws",
"Exception",
"{",
"Statement",
"stmt",
"=",
"null",
";",
"try",
"{",
"stmt",
"=",
"... | Creates new row in table
@param broker
@param field
@param sequenceName
@param maxKey
@throws Exception | [
"Creates",
"new",
"row",
"in",
"table"
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/util/sequence/SequenceManagerStoredProcedureImpl.java#L274-L302 | train |
foundation-runtime/logging | logging-log4j/src/main/java/com/cisco/oss/foundation/logging/FoundationLogger.java | FoundationLogger.init | static void init() {// NOPMD
determineIfNTEventLogIsSupported();
URL resource = null;
final String configurationOptionStr = OptionConverter.getSystemProperty(DEFAULT_CONFIGURATION_KEY, null);
if (configurationOptionStr != null) {
try {
resource = new URL(configurationOptionStr);
} catch (Malformed... | java | static void init() {// NOPMD
determineIfNTEventLogIsSupported();
URL resource = null;
final String configurationOptionStr = OptionConverter.getSystemProperty(DEFAULT_CONFIGURATION_KEY, null);
if (configurationOptionStr != null) {
try {
resource = new URL(configurationOptionStr);
} catch (Malformed... | [
"static",
"void",
"init",
"(",
")",
"{",
"// NOPMD",
"determineIfNTEventLogIsSupported",
"(",
")",
";",
"URL",
"resource",
"=",
"null",
";",
"final",
"String",
"configurationOptionStr",
"=",
"OptionConverter",
".",
"getSystemProperty",
"(",
"DEFAULT_CONFIGURATION_KEY"... | Initialize that Foundation Logging library. | [
"Initialize",
"that",
"Foundation",
"Logging",
"library",
"."
] | cd0a07b3c5b458ecf90ab92a1e0c72a067f5cbd6 | https://github.com/foundation-runtime/logging/blob/cd0a07b3c5b458ecf90ab92a1e0c72a067f5cbd6/logging-log4j/src/main/java/com/cisco/oss/foundation/logging/FoundationLogger.java#L101-L158 | train |
foundation-runtime/logging | logging-log4j/src/main/java/com/cisco/oss/foundation/logging/FoundationLogger.java | FoundationLogger.updateSniffingLoggersLevel | private static void updateSniffingLoggersLevel(Logger logger) {
InputStream settingIS = FoundationLogger.class
.getResourceAsStream("/sniffingLogger.xml");
if (settingIS == null) {
logger.debug("file sniffingLogger.xml not found in classpath");
} else {
try {
SAXBuilder builder = new SAXBuilder();
... | java | private static void updateSniffingLoggersLevel(Logger logger) {
InputStream settingIS = FoundationLogger.class
.getResourceAsStream("/sniffingLogger.xml");
if (settingIS == null) {
logger.debug("file sniffingLogger.xml not found in classpath");
} else {
try {
SAXBuilder builder = new SAXBuilder();
... | [
"private",
"static",
"void",
"updateSniffingLoggersLevel",
"(",
"Logger",
"logger",
")",
"{",
"InputStream",
"settingIS",
"=",
"FoundationLogger",
".",
"class",
".",
"getResourceAsStream",
"(",
"\"/sniffingLogger.xml\"",
")",
";",
"if",
"(",
"settingIS",
"==",
"null... | The sniffing Loggers are some special Loggers, whose level will be set to TRACE forcedly.
@param logger | [
"The",
"sniffing",
"Loggers",
"are",
"some",
"special",
"Loggers",
"whose",
"level",
"will",
"be",
"set",
"to",
"TRACE",
"forcedly",
"."
] | cd0a07b3c5b458ecf90ab92a1e0c72a067f5cbd6 | https://github.com/foundation-runtime/logging/blob/cd0a07b3c5b458ecf90ab92a1e0c72a067f5cbd6/logging-log4j/src/main/java/com/cisco/oss/foundation/logging/FoundationLogger.java#L348-L375 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/cache/ObjectCacheJCSImpl.java | ObjectCacheJCSImpl.cache | public void cache(Identity oid, Object obj)
{
try
{
jcsCache.put(oid.toString(), obj);
}
catch (CacheException e)
{
throw new RuntimeCacheException(e);
}
} | java | public void cache(Identity oid, Object obj)
{
try
{
jcsCache.put(oid.toString(), obj);
}
catch (CacheException e)
{
throw new RuntimeCacheException(e);
}
} | [
"public",
"void",
"cache",
"(",
"Identity",
"oid",
",",
"Object",
"obj",
")",
"{",
"try",
"{",
"jcsCache",
".",
"put",
"(",
"oid",
".",
"toString",
"(",
")",
",",
"obj",
")",
";",
"}",
"catch",
"(",
"CacheException",
"e",
")",
"{",
"throw",
"new",
... | makes object obj persistent to the Objectcache under the key oid. | [
"makes",
"object",
"obj",
"persistent",
"to",
"the",
"Objectcache",
"under",
"the",
"key",
"oid",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/cache/ObjectCacheJCSImpl.java#L98-L108 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/cache/ObjectCacheJCSImpl.java | ObjectCacheJCSImpl.remove | public void remove(Identity oid)
{
try
{
jcsCache.remove(oid.toString());
}
catch (CacheException e)
{
throw new RuntimeCacheException(e.getMessage());
}
} | java | public void remove(Identity oid)
{
try
{
jcsCache.remove(oid.toString());
}
catch (CacheException e)
{
throw new RuntimeCacheException(e.getMessage());
}
} | [
"public",
"void",
"remove",
"(",
"Identity",
"oid",
")",
"{",
"try",
"{",
"jcsCache",
".",
"remove",
"(",
"oid",
".",
"toString",
"(",
")",
")",
";",
"}",
"catch",
"(",
"CacheException",
"e",
")",
"{",
"throw",
"new",
"RuntimeCacheException",
"(",
"e",... | removes an Object from the cache.
@param oid the Identity of the object to be removed. | [
"removes",
"an",
"Object",
"from",
"the",
"cache",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/cache/ObjectCacheJCSImpl.java#L143-L153 | train |
geomajas/geomajas-project-server | plugin/geocoder/geocoder/src/main/java/org/geomajas/plugin/geocoder/service/YahooPlaceFinderGeocoderService.java | YahooPlaceFinderGeocoderService.search | public List<GetLocationResult> search(String q, int maxRows, Locale locale)
throws Exception {
List<GetLocationResult> searchResult = new ArrayList<GetLocationResult>();
String url = URLEncoder.encode(q, "UTF8");
url = "q=select%20*%20from%20geo.placefinder%20where%20text%3D%22"
+ url + "%22";
if (maxRo... | java | public List<GetLocationResult> search(String q, int maxRows, Locale locale)
throws Exception {
List<GetLocationResult> searchResult = new ArrayList<GetLocationResult>();
String url = URLEncoder.encode(q, "UTF8");
url = "q=select%20*%20from%20geo.placefinder%20where%20text%3D%22"
+ url + "%22";
if (maxRo... | [
"public",
"List",
"<",
"GetLocationResult",
">",
"search",
"(",
"String",
"q",
",",
"int",
"maxRows",
",",
"Locale",
"locale",
")",
"throws",
"Exception",
"{",
"List",
"<",
"GetLocationResult",
">",
"searchResult",
"=",
"new",
"ArrayList",
"<",
"GetLocationRes... | Call the Yahoo! PlaceFinder service for a result.
@param q
search string
@param maxRows
max number of rows in result, or 0 for all
@param locale
locale for strings
@return list of found results
@throws Exception
oops
@see <a
href="http://developer.yahoo.com/boss/geo/docs/free_YQL.html#table_pf">Yahoo!
Boss Geo PlaceFi... | [
"Call",
"the",
"Yahoo!",
"PlaceFinder",
"service",
"for",
"a",
"result",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/plugin/geocoder/geocoder/src/main/java/org/geomajas/plugin/geocoder/service/YahooPlaceFinderGeocoderService.java#L192-L231 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/metadata/DescriptorRepository.java | DescriptorRepository.getDescriptorFor | public ClassDescriptor getDescriptorFor(String strClassName) throws ClassNotPersistenceCapableException
{
ClassDescriptor result = discoverDescriptor(strClassName);
if (result == null)
{
throw new ClassNotPersistenceCapableException(strClassName + " not found in OJB Reposito... | java | public ClassDescriptor getDescriptorFor(String strClassName) throws ClassNotPersistenceCapableException
{
ClassDescriptor result = discoverDescriptor(strClassName);
if (result == null)
{
throw new ClassNotPersistenceCapableException(strClassName + " not found in OJB Reposito... | [
"public",
"ClassDescriptor",
"getDescriptorFor",
"(",
"String",
"strClassName",
")",
"throws",
"ClassNotPersistenceCapableException",
"{",
"ClassDescriptor",
"result",
"=",
"discoverDescriptor",
"(",
"strClassName",
")",
";",
"if",
"(",
"result",
"==",
"null",
")",
"{... | lookup a ClassDescriptor in the internal Hashtable
@param strClassName a fully qualified class name as it is returned by Class.getName(). | [
"lookup",
"a",
"ClassDescriptor",
"in",
"the",
"internal",
"Hashtable"
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/metadata/DescriptorRepository.java#L404-L415 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/metadata/DescriptorRepository.java | DescriptorRepository.getIsolationLevelAsString | protected String getIsolationLevelAsString()
{
if (defaultIsolationLevel == IL_READ_UNCOMMITTED)
{
return LITERAL_IL_READ_UNCOMMITTED;
}
else if (defaultIsolationLevel == IL_READ_COMMITTED)
{
return LITERAL_IL_READ_COMMITTED;
}
... | java | protected String getIsolationLevelAsString()
{
if (defaultIsolationLevel == IL_READ_UNCOMMITTED)
{
return LITERAL_IL_READ_UNCOMMITTED;
}
else if (defaultIsolationLevel == IL_READ_COMMITTED)
{
return LITERAL_IL_READ_COMMITTED;
}
... | [
"protected",
"String",
"getIsolationLevelAsString",
"(",
")",
"{",
"if",
"(",
"defaultIsolationLevel",
"==",
"IL_READ_UNCOMMITTED",
")",
"{",
"return",
"LITERAL_IL_READ_UNCOMMITTED",
";",
"}",
"else",
"if",
"(",
"defaultIsolationLevel",
"==",
"IL_READ_COMMITTED",
")",
... | returns IsolationLevel literal as matching
to the corresponding id
@return the IsolationLevel literal | [
"returns",
"IsolationLevel",
"literal",
"as",
"matching",
"to",
"the",
"corresponding",
"id"
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/metadata/DescriptorRepository.java#L584-L607 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/metadata/DescriptorRepository.java | DescriptorRepository.discoverDescriptor | private ClassDescriptor discoverDescriptor(Class clazz)
{
ClassDescriptor result = (ClassDescriptor) descriptorTable.get(clazz.getName());
if (result == null)
{
Class superClass = clazz.getSuperclass();
// only recurse if the superClass is not java.lang.Object... | java | private ClassDescriptor discoverDescriptor(Class clazz)
{
ClassDescriptor result = (ClassDescriptor) descriptorTable.get(clazz.getName());
if (result == null)
{
Class superClass = clazz.getSuperclass();
// only recurse if the superClass is not java.lang.Object... | [
"private",
"ClassDescriptor",
"discoverDescriptor",
"(",
"Class",
"clazz",
")",
"{",
"ClassDescriptor",
"result",
"=",
"(",
"ClassDescriptor",
")",
"descriptorTable",
".",
"get",
"(",
"clazz",
".",
"getName",
"(",
")",
")",
";",
"if",
"(",
"result",
"==",
"n... | Internal method for recursivly searching for a class descriptor that avoids
class loading when we already have a class object.
@param clazz The class whose descriptor we need to find
@return ClassDescriptor for <code>clazz</code> or <code>null</code>
if no ClassDescriptor could be located. | [
"Internal",
"method",
"for",
"recursivly",
"searching",
"for",
"a",
"class",
"descriptor",
"that",
"avoids",
"class",
"loading",
"when",
"we",
"already",
"have",
"a",
"class",
"object",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/metadata/DescriptorRepository.java#L654-L702 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/metadata/DescriptorRepository.java | DescriptorRepository.createResultSubClassesMultipleJoinedTables | private void createResultSubClassesMultipleJoinedTables(List result, ClassDescriptor cld, boolean wholeTree)
{
List tmp = (List) superClassMultipleJoinedTablesMap.get(cld.getClassOfObject());
if(tmp != null)
{
result.addAll(tmp);
if(wholeTree)
{
... | java | private void createResultSubClassesMultipleJoinedTables(List result, ClassDescriptor cld, boolean wholeTree)
{
List tmp = (List) superClassMultipleJoinedTablesMap.get(cld.getClassOfObject());
if(tmp != null)
{
result.addAll(tmp);
if(wholeTree)
{
... | [
"private",
"void",
"createResultSubClassesMultipleJoinedTables",
"(",
"List",
"result",
",",
"ClassDescriptor",
"cld",
",",
"boolean",
"wholeTree",
")",
"{",
"List",
"tmp",
"=",
"(",
"List",
")",
"superClassMultipleJoinedTablesMap",
".",
"get",
"(",
"cld",
".",
"g... | Add all sub-classes using multiple joined tables feature for specified class.
@param result The list to add results.
@param cld The {@link ClassDescriptor} of the class to search for sub-classes.
@param wholeTree If set <em>true</em>, the whole sub-class tree of the specified
class will be returned. If <em>false</em> o... | [
"Add",
"all",
"sub",
"-",
"classes",
"using",
"multiple",
"joined",
"tables",
"feature",
"for",
"specified",
"class",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/metadata/DescriptorRepository.java#L819-L835 | train |
geomajas/geomajas-project-server | plugin/layer-wms/wms/src/main/java/org/geomajas/layer/wms/WmsLayer.java | WmsLayer.getProxyAuthentication | public ProxyAuthentication getProxyAuthentication() {
// convert authentication to layerAuthentication so we only use one
// TODO Remove when removing deprecated authentication field.
if (layerAuthentication == null && authentication != null) {
layerAuthentication = new LayerAuthentication();
layerAuthentic... | java | public ProxyAuthentication getProxyAuthentication() {
// convert authentication to layerAuthentication so we only use one
// TODO Remove when removing deprecated authentication field.
if (layerAuthentication == null && authentication != null) {
layerAuthentication = new LayerAuthentication();
layerAuthentic... | [
"public",
"ProxyAuthentication",
"getProxyAuthentication",
"(",
")",
"{",
"// convert authentication to layerAuthentication so we only use one",
"// TODO Remove when removing deprecated authentication field.",
"if",
"(",
"layerAuthentication",
"==",
"null",
"&&",
"authentication",
"!="... | Get the authentication info for this layer.
@return authentication info. | [
"Get",
"the",
"authentication",
"info",
"for",
"this",
"layer",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/plugin/layer-wms/wms/src/main/java/org/geomajas/layer/wms/WmsLayer.java#L805-L820 | train |
geomajas/geomajas-project-server | plugin/layer-wms/wms/src/main/java/org/geomajas/layer/wms/WmsLayer.java | WmsLayer.setUseCache | @Api
public void setUseCache(boolean useCache) {
if (null == cacheManagerService && useCache) {
log.warn("The caching plugin needs to be available to cache WMS requests. Not setting useCache.");
} else {
this.useCache = useCache;
}
} | java | @Api
public void setUseCache(boolean useCache) {
if (null == cacheManagerService && useCache) {
log.warn("The caching plugin needs to be available to cache WMS requests. Not setting useCache.");
} else {
this.useCache = useCache;
}
} | [
"@",
"Api",
"public",
"void",
"setUseCache",
"(",
"boolean",
"useCache",
")",
"{",
"if",
"(",
"null",
"==",
"cacheManagerService",
"&&",
"useCache",
")",
"{",
"log",
".",
"warn",
"(",
"\"The caching plugin needs to be available to cache WMS requests. Not setting useCach... | Set whether the WMS tiles should be cached for later use. This implies that the WMS tiles will be proxied.
@param useCache true when request needs to be cached
@since 1.9.0 | [
"Set",
"whether",
"the",
"WMS",
"tiles",
"should",
"be",
"cached",
"for",
"later",
"use",
".",
"This",
"implies",
"that",
"the",
"WMS",
"tiles",
"will",
"be",
"proxied",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/plugin/layer-wms/wms/src/main/java/org/geomajas/layer/wms/WmsLayer.java#L860-L867 | train |
geomajas/geomajas-project-server | plugin/staticsecurity/staticsecurity/src/main/java/org/geomajas/plugin/staticsecurity/configuration/LayerAuthorization.java | LayerAuthorization.check | protected boolean check(String id, List<String> includes, List<String> excludes) {
return check(id, includes) && !check(id, excludes);
} | java | protected boolean check(String id, List<String> includes, List<String> excludes) {
return check(id, includes) && !check(id, excludes);
} | [
"protected",
"boolean",
"check",
"(",
"String",
"id",
",",
"List",
"<",
"String",
">",
"includes",
",",
"List",
"<",
"String",
">",
"excludes",
")",
"{",
"return",
"check",
"(",
"id",
",",
"includes",
")",
"&&",
"!",
"check",
"(",
"id",
",",
"exclude... | Check whether the given id is included in the list of includes and not excluded.
@param id id to check
@param includes list of include regular expressions
@param excludes list of exclude regular expressions
@return true when id included and not excluded | [
"Check",
"whether",
"the",
"given",
"id",
"is",
"included",
"in",
"the",
"list",
"of",
"includes",
"and",
"not",
"excluded",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/plugin/staticsecurity/staticsecurity/src/main/java/org/geomajas/plugin/staticsecurity/configuration/LayerAuthorization.java#L91-L93 | train |
geomajas/geomajas-project-server | plugin/staticsecurity/staticsecurity/src/main/java/org/geomajas/plugin/staticsecurity/configuration/LayerAuthorization.java | LayerAuthorization.check | protected boolean check(String id, List<String> includes) {
if (null != includes) {
for (String check : includes) {
if (check(id, check)) {
return true;
}
}
}
return false;
} | java | protected boolean check(String id, List<String> includes) {
if (null != includes) {
for (String check : includes) {
if (check(id, check)) {
return true;
}
}
}
return false;
} | [
"protected",
"boolean",
"check",
"(",
"String",
"id",
",",
"List",
"<",
"String",
">",
"includes",
")",
"{",
"if",
"(",
"null",
"!=",
"includes",
")",
"{",
"for",
"(",
"String",
"check",
":",
"includes",
")",
"{",
"if",
"(",
"check",
"(",
"id",
","... | Check whether the given is is matched by one of the include expressions.
@param id id to check
@param includes list of include regular expressions
@return true when id is included | [
"Check",
"whether",
"the",
"given",
"is",
"is",
"matched",
"by",
"one",
"of",
"the",
"include",
"expressions",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/plugin/staticsecurity/staticsecurity/src/main/java/org/geomajas/plugin/staticsecurity/configuration/LayerAuthorization.java#L102-L111 | train |
geomajas/geomajas-project-server | plugin/staticsecurity/staticsecurity/src/main/java/org/geomajas/plugin/staticsecurity/configuration/LayerAuthorization.java | LayerAuthorization.check | protected boolean check(String value, String regex) {
Pattern pattern = Pattern.compile(regex);
return pattern.matcher(value).matches();
} | java | protected boolean check(String value, String regex) {
Pattern pattern = Pattern.compile(regex);
return pattern.matcher(value).matches();
} | [
"protected",
"boolean",
"check",
"(",
"String",
"value",
",",
"String",
"regex",
")",
"{",
"Pattern",
"pattern",
"=",
"Pattern",
".",
"compile",
"(",
"regex",
")",
";",
"return",
"pattern",
".",
"matcher",
"(",
"value",
")",
".",
"matches",
"(",
")",
"... | Check whether the value is matched by a regular expression.
@param value value
@param regex regular expression
@return true when value is matched | [
"Check",
"whether",
"the",
"value",
"is",
"matched",
"by",
"a",
"regular",
"expression",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/plugin/staticsecurity/staticsecurity/src/main/java/org/geomajas/plugin/staticsecurity/configuration/LayerAuthorization.java#L120-L123 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/accesslayer/sql/SqlPkStatement.java | SqlPkStatement.getClassDescriptor | protected ClassDescriptor getClassDescriptor()
{
ClassDescriptor cld = (ClassDescriptor) m_classDescriptor.get();
if(cld == null)
{
throw new OJBRuntimeException("Requested ClassDescriptor instance was already GC by JVM");
}
return cld;
} | java | protected ClassDescriptor getClassDescriptor()
{
ClassDescriptor cld = (ClassDescriptor) m_classDescriptor.get();
if(cld == null)
{
throw new OJBRuntimeException("Requested ClassDescriptor instance was already GC by JVM");
}
return cld;
} | [
"protected",
"ClassDescriptor",
"getClassDescriptor",
"(",
")",
"{",
"ClassDescriptor",
"cld",
"=",
"(",
"ClassDescriptor",
")",
"m_classDescriptor",
".",
"get",
"(",
")",
";",
"if",
"(",
"cld",
"==",
"null",
")",
"{",
"throw",
"new",
"OJBRuntimeException",
"(... | Returns the classDescriptor.
@return ClassDescriptor | [
"Returns",
"the",
"classDescriptor",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/sql/SqlPkStatement.java#L67-L75 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/accesslayer/sql/SqlPkStatement.java | SqlPkStatement.appendWhereClause | protected void appendWhereClause(FieldDescriptor[] fields, StringBuffer stmt) throws PersistenceBrokerException
{
stmt.append(" WHERE ");
for(int i = 0; i < fields.length; i++)
{
FieldDescriptor fmd = fields[i];
stmt.append(fmd.getColumnName());
... | java | protected void appendWhereClause(FieldDescriptor[] fields, StringBuffer stmt) throws PersistenceBrokerException
{
stmt.append(" WHERE ");
for(int i = 0; i < fields.length; i++)
{
FieldDescriptor fmd = fields[i];
stmt.append(fmd.getColumnName());
... | [
"protected",
"void",
"appendWhereClause",
"(",
"FieldDescriptor",
"[",
"]",
"fields",
",",
"StringBuffer",
"stmt",
")",
"throws",
"PersistenceBrokerException",
"{",
"stmt",
".",
"append",
"(",
"\" WHERE \"",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"... | Generate a sql where-clause for the array of fields
@param fields array containing all columns used in WHERE clause | [
"Generate",
"a",
"sql",
"where",
"-",
"clause",
"for",
"the",
"array",
"of",
"fields"
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/sql/SqlPkStatement.java#L82-L97 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/accesslayer/sql/SqlPkStatement.java | SqlPkStatement.appendWhereClause | protected void appendWhereClause(ClassDescriptor cld, boolean useLocking, StringBuffer stmt)
{
FieldDescriptor[] pkFields = cld.getPkFields();
FieldDescriptor[] fields;
fields = pkFields;
if(useLocking)
{
FieldDescriptor[] lockingFields = cld.getLockingFi... | java | protected void appendWhereClause(ClassDescriptor cld, boolean useLocking, StringBuffer stmt)
{
FieldDescriptor[] pkFields = cld.getPkFields();
FieldDescriptor[] fields;
fields = pkFields;
if(useLocking)
{
FieldDescriptor[] lockingFields = cld.getLockingFi... | [
"protected",
"void",
"appendWhereClause",
"(",
"ClassDescriptor",
"cld",
",",
"boolean",
"useLocking",
",",
"StringBuffer",
"stmt",
")",
"{",
"FieldDescriptor",
"[",
"]",
"pkFields",
"=",
"cld",
".",
"getPkFields",
"(",
")",
";",
"FieldDescriptor",
"[",
"]",
"... | Generate a where clause for a prepared Statement.
Only primary key and locking fields are used in this where clause
@param cld the ClassDescriptor
@param useLocking true if locking fields should be included
@param stmt the StatementBuffer | [
"Generate",
"a",
"where",
"clause",
"for",
"a",
"prepared",
"Statement",
".",
"Only",
"primary",
"key",
"and",
"locking",
"fields",
"are",
"used",
"in",
"this",
"where",
"clause"
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/sql/SqlPkStatement.java#L107-L125 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/otm/copy/SerializeObjectCopyStrategy.java | SerializeObjectCopyStrategy.copy | public Object copy(final Object obj, PersistenceBroker broker)
throws ObjectCopyException
{
ObjectOutputStream oos = null;
ObjectInputStream ois = null;
try
{
final ByteArrayOutputStream bos = new ByteArrayOutputStream();
oos = new ObjectOutputStream(bos);
// serialize and pass the object
... | java | public Object copy(final Object obj, PersistenceBroker broker)
throws ObjectCopyException
{
ObjectOutputStream oos = null;
ObjectInputStream ois = null;
try
{
final ByteArrayOutputStream bos = new ByteArrayOutputStream();
oos = new ObjectOutputStream(bos);
// serialize and pass the object
... | [
"public",
"Object",
"copy",
"(",
"final",
"Object",
"obj",
",",
"PersistenceBroker",
"broker",
")",
"throws",
"ObjectCopyException",
"{",
"ObjectOutputStream",
"oos",
"=",
"null",
";",
"ObjectInputStream",
"ois",
"=",
"null",
";",
"try",
"{",
"final",
"ByteArray... | This implementation will probably be slower than the metadata
object copy, but this was easier to implement.
@see org.apache.ojb.otm.copy.ObjectCopyStrategy#copy(Object) | [
"This",
"implementation",
"will",
"probably",
"be",
"slower",
"than",
"the",
"metadata",
"object",
"copy",
"but",
"this",
"was",
"easier",
"to",
"implement",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/otm/copy/SerializeObjectCopyStrategy.java#L34-L74 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/accesslayer/StatementManager.java | StatementManager.bindDelete | public void bindDelete(PreparedStatement stmt, Identity oid, ClassDescriptor cld) throws SQLException
{
Object[] pkValues = oid.getPrimaryKeyValues();
FieldDescriptor[] pkFields = cld.getPkFields();
int i = 0;
try
{
for (; i < pkValues.length; i++)
... | java | public void bindDelete(PreparedStatement stmt, Identity oid, ClassDescriptor cld) throws SQLException
{
Object[] pkValues = oid.getPrimaryKeyValues();
FieldDescriptor[] pkFields = cld.getPkFields();
int i = 0;
try
{
for (; i < pkValues.length; i++)
... | [
"public",
"void",
"bindDelete",
"(",
"PreparedStatement",
"stmt",
",",
"Identity",
"oid",
",",
"ClassDescriptor",
"cld",
")",
"throws",
"SQLException",
"{",
"Object",
"[",
"]",
"pkValues",
"=",
"oid",
".",
"getPrimaryKeyValues",
"(",
")",
";",
"FieldDescriptor",... | binds the Identities Primary key values to the statement | [
"binds",
"the",
"Identities",
"Primary",
"key",
"values",
"to",
"the",
"statement"
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/StatementManager.java#L126-L144 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/accesslayer/StatementManager.java | StatementManager.bindDelete | public void bindDelete(PreparedStatement stmt, ClassDescriptor cld, Object obj) throws SQLException
{
if (cld.getDeleteProcedure() != null)
{
this.bindProcedure(stmt, cld, obj, cld.getDeleteProcedure());
}
else
{
int index = 1;
Val... | java | public void bindDelete(PreparedStatement stmt, ClassDescriptor cld, Object obj) throws SQLException
{
if (cld.getDeleteProcedure() != null)
{
this.bindProcedure(stmt, cld, obj, cld.getDeleteProcedure());
}
else
{
int index = 1;
Val... | [
"public",
"void",
"bindDelete",
"(",
"PreparedStatement",
"stmt",
",",
"ClassDescriptor",
"cld",
",",
"Object",
"obj",
")",
"throws",
"SQLException",
"{",
"if",
"(",
"cld",
".",
"getDeleteProcedure",
"(",
")",
"!=",
"null",
")",
"{",
"this",
".",
"bindProced... | binds the objects primary key and locking values to the statement, BRJ | [
"binds",
"the",
"objects",
"primary",
"key",
"and",
"locking",
"values",
"to",
"the",
"statement",
"BRJ"
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/StatementManager.java#L149-L177 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/accesslayer/StatementManager.java | StatementManager.bindStatementValue | private int bindStatementValue(PreparedStatement stmt, int index, Object attributeOrQuery, Object value, ClassDescriptor cld)
throws SQLException
{
FieldDescriptor fld = null;
// if value is a subQuery bind it
if (value instanceof Query)
{
Query subQuer... | java | private int bindStatementValue(PreparedStatement stmt, int index, Object attributeOrQuery, Object value, ClassDescriptor cld)
throws SQLException
{
FieldDescriptor fld = null;
// if value is a subQuery bind it
if (value instanceof Query)
{
Query subQuer... | [
"private",
"int",
"bindStatementValue",
"(",
"PreparedStatement",
"stmt",
",",
"int",
"index",
",",
"Object",
"attributeOrQuery",
",",
"Object",
"value",
",",
"ClassDescriptor",
"cld",
")",
"throws",
"SQLException",
"{",
"FieldDescriptor",
"fld",
"=",
"null",
";",... | bind attribute and value
@param stmt
@param index
@param attributeOrQuery
@param value
@param cld
@return
@throws SQLException | [
"bind",
"attribute",
"and",
"value"
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/StatementManager.java#L189-L236 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/accesslayer/StatementManager.java | StatementManager.bindSelect | public void bindSelect(PreparedStatement stmt, Identity oid, ClassDescriptor cld, boolean callableStmt) throws SQLException
{
ValueContainer[] values = null;
int i = 0;
int j = 0;
if (cld == null)
{
cld = m_broker.getClassDescriptor(oid.getObjectsRealClas... | java | public void bindSelect(PreparedStatement stmt, Identity oid, ClassDescriptor cld, boolean callableStmt) throws SQLException
{
ValueContainer[] values = null;
int i = 0;
int j = 0;
if (cld == null)
{
cld = m_broker.getClassDescriptor(oid.getObjectsRealClas... | [
"public",
"void",
"bindSelect",
"(",
"PreparedStatement",
"stmt",
",",
"Identity",
"oid",
",",
"ClassDescriptor",
"cld",
",",
"boolean",
"callableStmt",
")",
"throws",
"SQLException",
"{",
"ValueContainer",
"[",
"]",
"values",
"=",
"null",
";",
"int",
"i",
"="... | Binds the Identities Primary key values to the statement. | [
"Binds",
"the",
"Identities",
"Primary",
"key",
"values",
"to",
"the",
"statement",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/StatementManager.java#L454-L484 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/accesslayer/StatementManager.java | StatementManager.getDeleteStatement | public PreparedStatement getDeleteStatement(ClassDescriptor cld) throws PersistenceBrokerSQLException, PersistenceBrokerException
{
try
{
return cld.getStatementsForClass(m_conMan).getDeleteStmt(m_conMan.getConnection());
}
catch (SQLException e)
{
... | java | public PreparedStatement getDeleteStatement(ClassDescriptor cld) throws PersistenceBrokerSQLException, PersistenceBrokerException
{
try
{
return cld.getStatementsForClass(m_conMan).getDeleteStmt(m_conMan.getConnection());
}
catch (SQLException e)
{
... | [
"public",
"PreparedStatement",
"getDeleteStatement",
"(",
"ClassDescriptor",
"cld",
")",
"throws",
"PersistenceBrokerSQLException",
",",
"PersistenceBrokerException",
"{",
"try",
"{",
"return",
"cld",
".",
"getStatementsForClass",
"(",
"m_conMan",
")",
".",
"getDeleteStmt... | return a prepared DELETE Statement fitting for the given ClassDescriptor | [
"return",
"a",
"prepared",
"DELETE",
"Statement",
"fitting",
"for",
"the",
"given",
"ClassDescriptor"
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/StatementManager.java#L549-L563 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/accesslayer/StatementManager.java | StatementManager.getInsertStatement | public PreparedStatement getInsertStatement(ClassDescriptor cds) throws PersistenceBrokerSQLException, PersistenceBrokerException
{
try
{
return cds.getStatementsForClass(m_conMan).getInsertStmt(m_conMan.getConnection());
}
catch (SQLException e)
{
... | java | public PreparedStatement getInsertStatement(ClassDescriptor cds) throws PersistenceBrokerSQLException, PersistenceBrokerException
{
try
{
return cds.getStatementsForClass(m_conMan).getInsertStmt(m_conMan.getConnection());
}
catch (SQLException e)
{
... | [
"public",
"PreparedStatement",
"getInsertStatement",
"(",
"ClassDescriptor",
"cds",
")",
"throws",
"PersistenceBrokerSQLException",
",",
"PersistenceBrokerException",
"{",
"try",
"{",
"return",
"cds",
".",
"getStatementsForClass",
"(",
"m_conMan",
")",
".",
"getInsertStmt... | return a prepared Insert Statement fitting for the given ClassDescriptor | [
"return",
"a",
"prepared",
"Insert",
"Statement",
"fitting",
"for",
"the",
"given",
"ClassDescriptor"
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/StatementManager.java#L584-L598 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/accesslayer/StatementManager.java | StatementManager.getPreparedStatement | public PreparedStatement getPreparedStatement(ClassDescriptor cds, String sql,
boolean scrollable, int explicitFetchSizeHint, boolean callableStmt)
throws PersistenceBrokerException
{
try
{
return cds.getStatementsForCla... | java | public PreparedStatement getPreparedStatement(ClassDescriptor cds, String sql,
boolean scrollable, int explicitFetchSizeHint, boolean callableStmt)
throws PersistenceBrokerException
{
try
{
return cds.getStatementsForCla... | [
"public",
"PreparedStatement",
"getPreparedStatement",
"(",
"ClassDescriptor",
"cds",
",",
"String",
"sql",
",",
"boolean",
"scrollable",
",",
"int",
"explicitFetchSizeHint",
",",
"boolean",
"callableStmt",
")",
"throws",
"PersistenceBrokerException",
"{",
"try",
"{",
... | return a generic Statement for the given ClassDescriptor | [
"return",
"a",
"generic",
"Statement",
"for",
"the",
"given",
"ClassDescriptor"
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/StatementManager.java#L603-L615 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/accesslayer/StatementManager.java | StatementManager.getSelectByPKStatement | public PreparedStatement getSelectByPKStatement(ClassDescriptor cds) throws PersistenceBrokerSQLException, PersistenceBrokerException
{
try
{
return cds.getStatementsForClass(m_conMan).getSelectByPKStmt(m_conMan.getConnection());
}
catch (SQLException e)
{
... | java | public PreparedStatement getSelectByPKStatement(ClassDescriptor cds) throws PersistenceBrokerSQLException, PersistenceBrokerException
{
try
{
return cds.getStatementsForClass(m_conMan).getSelectByPKStmt(m_conMan.getConnection());
}
catch (SQLException e)
{
... | [
"public",
"PreparedStatement",
"getSelectByPKStatement",
"(",
"ClassDescriptor",
"cds",
")",
"throws",
"PersistenceBrokerSQLException",
",",
"PersistenceBrokerException",
"{",
"try",
"{",
"return",
"cds",
".",
"getStatementsForClass",
"(",
"m_conMan",
")",
".",
"getSelect... | return a prepared Select Statement for the given ClassDescriptor | [
"return",
"a",
"prepared",
"Select",
"Statement",
"for",
"the",
"given",
"ClassDescriptor"
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/StatementManager.java#L620-L634 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/accesslayer/StatementManager.java | StatementManager.getUpdateStatement | public PreparedStatement getUpdateStatement(ClassDescriptor cds) throws PersistenceBrokerSQLException, PersistenceBrokerException
{
try
{
return cds.getStatementsForClass(m_conMan).getUpdateStmt(m_conMan.getConnection());
}
catch (SQLException e)
{
... | java | public PreparedStatement getUpdateStatement(ClassDescriptor cds) throws PersistenceBrokerSQLException, PersistenceBrokerException
{
try
{
return cds.getStatementsForClass(m_conMan).getUpdateStmt(m_conMan.getConnection());
}
catch (SQLException e)
{
... | [
"public",
"PreparedStatement",
"getUpdateStatement",
"(",
"ClassDescriptor",
"cds",
")",
"throws",
"PersistenceBrokerSQLException",
",",
"PersistenceBrokerException",
"{",
"try",
"{",
"return",
"cds",
".",
"getStatementsForClass",
"(",
"m_conMan",
")",
".",
"getUpdateStmt... | return a prepared Update Statement fitting to the given ClassDescriptor | [
"return",
"a",
"prepared",
"Update",
"Statement",
"fitting",
"to",
"the",
"given",
"ClassDescriptor"
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/StatementManager.java#L639-L653 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/accesslayer/StatementManager.java | StatementManager.getAllValues | protected ValueContainer[] getAllValues(ClassDescriptor cld, Object obj) throws PersistenceBrokerException
{
return m_broker.serviceBrokerHelper().getAllRwValues(cld, obj);
} | java | protected ValueContainer[] getAllValues(ClassDescriptor cld, Object obj) throws PersistenceBrokerException
{
return m_broker.serviceBrokerHelper().getAllRwValues(cld, obj);
} | [
"protected",
"ValueContainer",
"[",
"]",
"getAllValues",
"(",
"ClassDescriptor",
"cld",
",",
"Object",
"obj",
")",
"throws",
"PersistenceBrokerException",
"{",
"return",
"m_broker",
".",
"serviceBrokerHelper",
"(",
")",
".",
"getAllRwValues",
"(",
"cld",
",",
"obj... | returns an array containing values for all the Objects attribute
@throws PersistenceBrokerException if there is an erros accessing obj field values | [
"returns",
"an",
"array",
"containing",
"values",
"for",
"all",
"the",
"Objects",
"attribute"
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/StatementManager.java#L659-L662 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/accesslayer/StatementManager.java | StatementManager.getKeyValues | protected ValueContainer[] getKeyValues(PersistenceBroker broker, ClassDescriptor cld, Object obj) throws PersistenceBrokerException
{
return broker.serviceBrokerHelper().getKeyValues(cld, obj);
} | java | protected ValueContainer[] getKeyValues(PersistenceBroker broker, ClassDescriptor cld, Object obj) throws PersistenceBrokerException
{
return broker.serviceBrokerHelper().getKeyValues(cld, obj);
} | [
"protected",
"ValueContainer",
"[",
"]",
"getKeyValues",
"(",
"PersistenceBroker",
"broker",
",",
"ClassDescriptor",
"cld",
",",
"Object",
"obj",
")",
"throws",
"PersistenceBrokerException",
"{",
"return",
"broker",
".",
"serviceBrokerHelper",
"(",
")",
".",
"getKey... | returns an Array with an Objects PK VALUES
@throws PersistenceBrokerException if there is an erros accessing o field values | [
"returns",
"an",
"Array",
"with",
"an",
"Objects",
"PK",
"VALUES"
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/StatementManager.java#L668-L671 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/accesslayer/StatementManager.java | StatementManager.getKeyValues | protected ValueContainer[] getKeyValues(PersistenceBroker broker, ClassDescriptor cld, Identity oid) throws PersistenceBrokerException
{
return broker.serviceBrokerHelper().getKeyValues(cld, oid);
} | java | protected ValueContainer[] getKeyValues(PersistenceBroker broker, ClassDescriptor cld, Identity oid) throws PersistenceBrokerException
{
return broker.serviceBrokerHelper().getKeyValues(cld, oid);
} | [
"protected",
"ValueContainer",
"[",
"]",
"getKeyValues",
"(",
"PersistenceBroker",
"broker",
",",
"ClassDescriptor",
"cld",
",",
"Identity",
"oid",
")",
"throws",
"PersistenceBrokerException",
"{",
"return",
"broker",
".",
"serviceBrokerHelper",
"(",
")",
".",
"getK... | returns an Array with an Identities PK VALUES
@throws PersistenceBrokerException if there is an erros accessing o field values | [
"returns",
"an",
"Array",
"with",
"an",
"Identities",
"PK",
"VALUES"
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/StatementManager.java#L677-L680 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/accesslayer/StatementManager.java | StatementManager.getNonKeyValues | protected ValueContainer[] getNonKeyValues(PersistenceBroker broker, ClassDescriptor cld, Object obj) throws PersistenceBrokerException
{
return broker.serviceBrokerHelper().getNonKeyRwValues(cld, obj);
} | java | protected ValueContainer[] getNonKeyValues(PersistenceBroker broker, ClassDescriptor cld, Object obj) throws PersistenceBrokerException
{
return broker.serviceBrokerHelper().getNonKeyRwValues(cld, obj);
} | [
"protected",
"ValueContainer",
"[",
"]",
"getNonKeyValues",
"(",
"PersistenceBroker",
"broker",
",",
"ClassDescriptor",
"cld",
",",
"Object",
"obj",
")",
"throws",
"PersistenceBrokerException",
"{",
"return",
"broker",
".",
"serviceBrokerHelper",
"(",
")",
".",
"get... | returns an Array with an Objects NON-PK VALUES
@throws PersistenceBrokerException if there is an erros accessing o field values | [
"returns",
"an",
"Array",
"with",
"an",
"Objects",
"NON",
"-",
"PK",
"VALUES"
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/StatementManager.java#L686-L689 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/accesslayer/StatementManager.java | StatementManager.bindProcedure | private void bindProcedure(PreparedStatement stmt, ClassDescriptor cld, Object obj, ProcedureDescriptor proc)
throws SQLException
{
int valueSub = 0;
// Figure out if we are using a callable statement. If we are, then we
// will need to register one or more output paramet... | java | private void bindProcedure(PreparedStatement stmt, ClassDescriptor cld, Object obj, ProcedureDescriptor proc)
throws SQLException
{
int valueSub = 0;
// Figure out if we are using a callable statement. If we are, then we
// will need to register one or more output paramet... | [
"private",
"void",
"bindProcedure",
"(",
"PreparedStatement",
"stmt",
",",
"ClassDescriptor",
"cld",
",",
"Object",
"obj",
",",
"ProcedureDescriptor",
"proc",
")",
"throws",
"SQLException",
"{",
"int",
"valueSub",
"=",
"0",
";",
"// Figure out if we are using a callab... | Bind a prepared statment that represents a call to a procedure or
user-defined function.
@param stmt the statement to bind.
@param cld the class descriptor of the object that triggered the
invocation of the procedure or user-defined function.
@param obj the object that triggered the invocation of the procedure
or user... | [
"Bind",
"a",
"prepared",
"statment",
"that",
"represents",
"a",
"call",
"to",
"a",
"procedure",
"or",
"user",
"-",
"defined",
"function",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/StatementManager.java#L704-L754 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/accesslayer/StatementManager.java | StatementManager.setObjectForStatement | private void setObjectForStatement(PreparedStatement stmt, int index, Object value, int sqlType)
throws SQLException
{
if (value == null)
{
m_platform.setNullForStatement(stmt, index, sqlType);
}
else
{
m_platform.setObjectForState... | java | private void setObjectForStatement(PreparedStatement stmt, int index, Object value, int sqlType)
throws SQLException
{
if (value == null)
{
m_platform.setNullForStatement(stmt, index, sqlType);
}
else
{
m_platform.setObjectForState... | [
"private",
"void",
"setObjectForStatement",
"(",
"PreparedStatement",
"stmt",
",",
"int",
"index",
",",
"Object",
"value",
",",
"int",
"sqlType",
")",
"throws",
"SQLException",
"{",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"m_platform",
".",
"setNullForStat... | Sets object for statement at specific index, adhering to platform- and null-rules.
@param stmt the statement
@param index the current parameter index
@param value the value to set
@param sqlType the JDBC SQL-type of the value
@throws SQLException on platform error | [
"Sets",
"object",
"for",
"statement",
"at",
"specific",
"index",
"adhering",
"to",
"platform",
"-",
"and",
"null",
"-",
"rules",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/StatementManager.java#L764-L775 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/cache/ObjectCacheTwoLevelImpl.java | ObjectCacheTwoLevelImpl.remove | public void remove(Identity oid)
{
if(log.isDebugEnabled()) log.debug("Remove object " + oid);
sessionCache.remove(oid);
getApplicationCache().remove(oid);
} | java | public void remove(Identity oid)
{
if(log.isDebugEnabled()) log.debug("Remove object " + oid);
sessionCache.remove(oid);
getApplicationCache().remove(oid);
} | [
"public",
"void",
"remove",
"(",
"Identity",
"oid",
")",
"{",
"if",
"(",
"log",
".",
"isDebugEnabled",
"(",
")",
")",
"log",
".",
"debug",
"(",
"\"Remove object \"",
"+",
"oid",
")",
";",
"sessionCache",
".",
"remove",
"(",
"oid",
")",
";",
"getApplica... | Remove the corresponding object from session AND application cache. | [
"Remove",
"the",
"corresponding",
"object",
"from",
"session",
"AND",
"application",
"cache",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/cache/ObjectCacheTwoLevelImpl.java#L419-L424 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/cache/ObjectCacheTwoLevelImpl.java | ObjectCacheTwoLevelImpl.putToSessionCache | private void putToSessionCache(Identity oid, CacheEntry entry, boolean onlyIfNew)
{
if(onlyIfNew)
{
// no synchronization needed, because session cache was used per broker instance
if(!sessionCache.containsKey(oid)) sessionCache.put(oid, entry);
}
else
... | java | private void putToSessionCache(Identity oid, CacheEntry entry, boolean onlyIfNew)
{
if(onlyIfNew)
{
// no synchronization needed, because session cache was used per broker instance
if(!sessionCache.containsKey(oid)) sessionCache.put(oid, entry);
}
else
... | [
"private",
"void",
"putToSessionCache",
"(",
"Identity",
"oid",
",",
"CacheEntry",
"entry",
",",
"boolean",
"onlyIfNew",
")",
"{",
"if",
"(",
"onlyIfNew",
")",
"{",
"// no synchronization needed, because session cache was used per broker instance\r",
"if",
"(",
"!",
"se... | Put object to session cache.
@param oid The {@link org.apache.ojb.broker.Identity} of the object to cache
@param entry The {@link org.apache.ojb.broker.cache.ObjectCacheTwoLevelImpl.CacheEntry} of the object
@param onlyIfNew Flag, if set <em>true</em> only new objects (not already in session cache) be cached. | [
"Put",
"object",
"to",
"session",
"cache",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/cache/ObjectCacheTwoLevelImpl.java#L461-L472 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/cache/ObjectCacheTwoLevelImpl.java | ObjectCacheTwoLevelImpl.processQueue | private void processQueue()
{
CacheEntry sv;
while((sv = (CacheEntry) queue.poll()) != null)
{
sessionCache.remove(sv.oid);
}
} | java | private void processQueue()
{
CacheEntry sv;
while((sv = (CacheEntry) queue.poll()) != null)
{
sessionCache.remove(sv.oid);
}
} | [
"private",
"void",
"processQueue",
"(",
")",
"{",
"CacheEntry",
"sv",
";",
"while",
"(",
"(",
"sv",
"=",
"(",
"CacheEntry",
")",
"queue",
".",
"poll",
"(",
")",
")",
"!=",
"null",
")",
"{",
"sessionCache",
".",
"remove",
"(",
"sv",
".",
"oid",
")",... | Make sure that the Identity objects of garbage collected cached
objects are removed too. | [
"Make",
"sure",
"that",
"the",
"Identity",
"objects",
"of",
"garbage",
"collected",
"cached",
"objects",
"are",
"removed",
"too",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/cache/ObjectCacheTwoLevelImpl.java#L478-L485 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/cache/ObjectCacheTwoLevelImpl.java | ObjectCacheTwoLevelImpl.beforeClose | public void beforeClose(PBStateEvent event)
{
/*
arminw:
this is a workaround for use in managed environments. When a PB instance is used
within a container a PB.close call is done when leave the container method. This close
the PB handle (but the real instance is still... | java | public void beforeClose(PBStateEvent event)
{
/*
arminw:
this is a workaround for use in managed environments. When a PB instance is used
within a container a PB.close call is done when leave the container method. This close
the PB handle (but the real instance is still... | [
"public",
"void",
"beforeClose",
"(",
"PBStateEvent",
"event",
")",
"{",
"/*\r\n arminw:\r\n this is a workaround for use in managed environments. When a PB instance is used\r\n within a container a PB.close call is done when leave the container method. This close\r\n the... | Before closing the PersistenceBroker ensure that the session
cache is cleared | [
"Before",
"closing",
"the",
"PersistenceBroker",
"ensure",
"that",
"the",
"session",
"cache",
"is",
"cleared"
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/cache/ObjectCacheTwoLevelImpl.java#L518-L536 | train |
Axway/Grapes | server/src/main/java/org/axway/grapes/server/core/VersionsHandler.java | VersionsHandler.isUpToDate | public boolean isUpToDate(final DbArtifact artifact) {
final List<String> versions = repoHandler.getArtifactVersions(artifact);
final String currentVersion = artifact.getVersion();
final String lastDevVersion = getLastVersion(versions);
final String lastReleaseVersion = getLastRelease(v... | java | public boolean isUpToDate(final DbArtifact artifact) {
final List<String> versions = repoHandler.getArtifactVersions(artifact);
final String currentVersion = artifact.getVersion();
final String lastDevVersion = getLastVersion(versions);
final String lastReleaseVersion = getLastRelease(v... | [
"public",
"boolean",
"isUpToDate",
"(",
"final",
"DbArtifact",
"artifact",
")",
"{",
"final",
"List",
"<",
"String",
">",
"versions",
"=",
"repoHandler",
".",
"getArtifactVersions",
"(",
"artifact",
")",
";",
"final",
"String",
"currentVersion",
"=",
"artifact",... | Check if the current version match the last release or the last snapshot one
@param artifact
@return boolean | [
"Check",
"if",
"the",
"current",
"version",
"match",
"the",
"last",
"release",
"or",
"the",
"last",
"snapshot",
"one"
] | ce9cc73d85f83eaa5fbc991abb593915a8c8374e | https://github.com/Axway/Grapes/blob/ce9cc73d85f83eaa5fbc991abb593915a8c8374e/server/src/main/java/org/axway/grapes/server/core/VersionsHandler.java#L38-L56 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/accesslayer/RowReaderDefaultImpl.java | RowReaderDefaultImpl.buildOrRefreshObject | protected Object buildOrRefreshObject(Map row, ClassDescriptor targetClassDescriptor, Object targetObject)
{
Object result = targetObject;
FieldDescriptor fmd;
FieldDescriptor[] fields = targetClassDescriptor.getFieldDescriptor(true);
if(targetObject == null)
{
... | java | protected Object buildOrRefreshObject(Map row, ClassDescriptor targetClassDescriptor, Object targetObject)
{
Object result = targetObject;
FieldDescriptor fmd;
FieldDescriptor[] fields = targetClassDescriptor.getFieldDescriptor(true);
if(targetObject == null)
{
... | [
"protected",
"Object",
"buildOrRefreshObject",
"(",
"Map",
"row",
",",
"ClassDescriptor",
"targetClassDescriptor",
",",
"Object",
"targetObject",
")",
"{",
"Object",
"result",
"=",
"targetObject",
";",
"FieldDescriptor",
"fmd",
";",
"FieldDescriptor",
"[",
"]",
"fie... | Creates an object instance according to clb, and fills its fileds width data provided by row.
@param row A {@link Map} contain the Object/Row mapping for the object.
@param targetClassDescriptor If the "ojbConcreteClass" feature was used, the target
{@link org.apache.ojb.broker.metadata.ClassDescriptor} could differ fr... | [
"Creates",
"an",
"object",
"instance",
"according",
"to",
"clb",
"and",
"fills",
"its",
"fileds",
"width",
"data",
"provided",
"by",
"row",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/RowReaderDefaultImpl.java#L108-L144 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/accesslayer/RowReaderDefaultImpl.java | RowReaderDefaultImpl.selectClassDescriptor | protected ClassDescriptor selectClassDescriptor(Map row) throws PersistenceBrokerException
{
ClassDescriptor result = m_cld;
Class ojbConcreteClass = (Class) row.get(OJB_CONCRETE_CLASS_KEY);
if(ojbConcreteClass != null)
{
result = m_cld.getRepository().getDescriptor... | java | protected ClassDescriptor selectClassDescriptor(Map row) throws PersistenceBrokerException
{
ClassDescriptor result = m_cld;
Class ojbConcreteClass = (Class) row.get(OJB_CONCRETE_CLASS_KEY);
if(ojbConcreteClass != null)
{
result = m_cld.getRepository().getDescriptor... | [
"protected",
"ClassDescriptor",
"selectClassDescriptor",
"(",
"Map",
"row",
")",
"throws",
"PersistenceBrokerException",
"{",
"ClassDescriptor",
"result",
"=",
"m_cld",
";",
"Class",
"ojbConcreteClass",
"=",
"(",
"Class",
")",
"row",
".",
"get",
"(",
"OJB_CONCRETE_C... | Check if there is an attribute which tells us which concrete class is to be instantiated. | [
"Check",
"if",
"there",
"is",
"an",
"attribute",
"which",
"tells",
"us",
"which",
"concrete",
"class",
"is",
"to",
"be",
"instantiated",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/RowReaderDefaultImpl.java#L299-L314 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/util/configuration/impl/ConfigurationAbstractImpl.java | ConfigurationAbstractImpl.load | protected void load()
{
properties = new Properties();
String filename = getFilename();
try
{
URL url = ClassHelper.getResource(filename);
if (url == null)
{
url = (new File(filename)).toURL();
}
... | java | protected void load()
{
properties = new Properties();
String filename = getFilename();
try
{
URL url = ClassHelper.getResource(filename);
if (url == null)
{
url = (new File(filename)).toURL();
}
... | [
"protected",
"void",
"load",
"(",
")",
"{",
"properties",
"=",
"new",
"Properties",
"(",
")",
";",
"String",
"filename",
"=",
"getFilename",
"(",
")",
";",
"try",
"{",
"URL",
"url",
"=",
"ClassHelper",
".",
"getResource",
"(",
"filename",
")",
";",
"if... | Loads the Configuration from the properties file.
Loads the properties file, or uses defaults on failure.
@see org.apache.ojb.broker.util.configuration.impl.ConfigurationAbstractImpl#setFilename(java.lang.String) | [
"Loads",
"the",
"Configuration",
"from",
"the",
"properties",
"file",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/util/configuration/impl/ConfigurationAbstractImpl.java#L413-L457 | train |
Axway/Grapes | server/src/main/java/org/axway/grapes/server/reports/ReportsRegistry.java | ReportsRegistry.init | public static void init() {
reports.clear();
Reflections reflections = new Reflections(REPORTS_PACKAGE);
final Set<Class<? extends Report>> reportClasses = reflections.getSubTypesOf(Report.class);
for(Class<? extends Report> c : reportClasses) {
LOG.info("Report class: " + c... | java | public static void init() {
reports.clear();
Reflections reflections = new Reflections(REPORTS_PACKAGE);
final Set<Class<? extends Report>> reportClasses = reflections.getSubTypesOf(Report.class);
for(Class<? extends Report> c : reportClasses) {
LOG.info("Report class: " + c... | [
"public",
"static",
"void",
"init",
"(",
")",
"{",
"reports",
".",
"clear",
"(",
")",
";",
"Reflections",
"reflections",
"=",
"new",
"Reflections",
"(",
"REPORTS_PACKAGE",
")",
";",
"final",
"Set",
"<",
"Class",
"<",
"?",
"extends",
"Report",
">",
">",
... | Initializes the set of report implementation. | [
"Initializes",
"the",
"set",
"of",
"report",
"implementation",
"."
] | ce9cc73d85f83eaa5fbc991abb593915a8c8374e | https://github.com/Axway/Grapes/blob/ce9cc73d85f83eaa5fbc991abb593915a8c8374e/server/src/main/java/org/axway/grapes/server/reports/ReportsRegistry.java#L30-L47 | train |
geomajas/geomajas-project-server | impl/src/main/java/org/geomajas/internal/rendering/painter/tile/UrlContentTilePainter.java | UrlContentTilePainter.paint | public InternalTile paint(InternalTile tile) throws RenderException {
if (tile.getContentType().equals(VectorTileContentType.URL_CONTENT)) {
if (urlBuilder != null) {
if (paintGeometries) {
urlBuilder.paintGeometries(paintGeometries);
urlBuilder.paintLabels(false);
tile.setFeatureContent(urlBuil... | java | public InternalTile paint(InternalTile tile) throws RenderException {
if (tile.getContentType().equals(VectorTileContentType.URL_CONTENT)) {
if (urlBuilder != null) {
if (paintGeometries) {
urlBuilder.paintGeometries(paintGeometries);
urlBuilder.paintLabels(false);
tile.setFeatureContent(urlBuil... | [
"public",
"InternalTile",
"paint",
"(",
"InternalTile",
"tile",
")",
"throws",
"RenderException",
"{",
"if",
"(",
"tile",
".",
"getContentType",
"(",
")",
".",
"equals",
"(",
"VectorTileContentType",
".",
"URL_CONTENT",
")",
")",
"{",
"if",
"(",
"urlBuilder",
... | Painter the tile, by building a URL where the image can be found.
@param tile
Must be an instance of {@link InternalTile}, and must have a non-null {@link RasterUrlBuilder}.
@return Returns a {@link InternalTile}. | [
"Painter",
"the",
"tile",
"by",
"building",
"a",
"URL",
"where",
"the",
"image",
"can",
"be",
"found",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/impl/src/main/java/org/geomajas/internal/rendering/painter/tile/UrlContentTilePainter.java#L69-L86 | train |
kuali/ojb-1.0.4 | src/tools/org/apache/ojb/tools/mapping/reversedb2/propertyEditors/EditableTreeNodeWithProperties.java | EditableTreeNodeWithProperties.addPropertyChangeListener | public void addPropertyChangeListener (String propertyName, java.beans.PropertyChangeListener listener)
{
this.propertyChangeDelegate.addPropertyChangeListener(propertyName, listener);
} | java | public void addPropertyChangeListener (String propertyName, java.beans.PropertyChangeListener listener)
{
this.propertyChangeDelegate.addPropertyChangeListener(propertyName, listener);
} | [
"public",
"void",
"addPropertyChangeListener",
"(",
"String",
"propertyName",
",",
"java",
".",
"beans",
".",
"PropertyChangeListener",
"listener",
")",
"{",
"this",
".",
"propertyChangeDelegate",
".",
"addPropertyChangeListener",
"(",
"propertyName",
",",
"listener",
... | Add a new PropertyChangeListener to this node for a specific property.
This functionality has
been borrowed from the java.beans package, though this class has
nothing to do with a bean | [
"Add",
"a",
"new",
"PropertyChangeListener",
"to",
"this",
"node",
"for",
"a",
"specific",
"property",
".",
"This",
"functionality",
"has",
"been",
"borrowed",
"from",
"the",
"java",
".",
"beans",
"package",
"though",
"this",
"class",
"has",
"nothing",
"to",
... | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/tools/org/apache/ojb/tools/mapping/reversedb2/propertyEditors/EditableTreeNodeWithProperties.java#L63-L66 | train |
kuali/ojb-1.0.4 | src/tools/org/apache/ojb/tools/mapping/reversedb2/propertyEditors/EditableTreeNodeWithProperties.java | EditableTreeNodeWithProperties.removePropertyChangeListener | public void removePropertyChangeListener (String propertyName, java.beans.PropertyChangeListener listener)
{
this.propertyChangeDelegate.removePropertyChangeListener(propertyName, listener);
} | java | public void removePropertyChangeListener (String propertyName, java.beans.PropertyChangeListener listener)
{
this.propertyChangeDelegate.removePropertyChangeListener(propertyName, listener);
} | [
"public",
"void",
"removePropertyChangeListener",
"(",
"String",
"propertyName",
",",
"java",
".",
"beans",
".",
"PropertyChangeListener",
"listener",
")",
"{",
"this",
".",
"propertyChangeDelegate",
".",
"removePropertyChangeListener",
"(",
"propertyName",
",",
"listen... | Remove a PropertyChangeListener for a specific property from this node.
This functionality has. Please note that the listener this does not remove
a listener that has been added without specifying the property it is
interested in. | [
"Remove",
"a",
"PropertyChangeListener",
"for",
"a",
"specific",
"property",
"from",
"this",
"node",
".",
"This",
"functionality",
"has",
".",
"Please",
"note",
"that",
"the",
"listener",
"this",
"does",
"not",
"remove",
"a",
"listener",
"that",
"has",
"been",... | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/tools/org/apache/ojb/tools/mapping/reversedb2/propertyEditors/EditableTreeNodeWithProperties.java#L84-L87 | train |
kuali/ojb-1.0.4 | src/tools/org/apache/ojb/tools/mapping/reversedb2/propertyEditors/EditableTreeNodeWithProperties.java | EditableTreeNodeWithProperties.setAttribute | public void setAttribute(String strKey, Object value)
{
this.propertyChangeDelegate.firePropertyChange(strKey,
hmAttributes.put(strKey, value), value);
} | java | public void setAttribute(String strKey, Object value)
{
this.propertyChangeDelegate.firePropertyChange(strKey,
hmAttributes.put(strKey, value), value);
} | [
"public",
"void",
"setAttribute",
"(",
"String",
"strKey",
",",
"Object",
"value",
")",
"{",
"this",
".",
"propertyChangeDelegate",
".",
"firePropertyChange",
"(",
"strKey",
",",
"hmAttributes",
".",
"put",
"(",
"strKey",
",",
"value",
")",
",",
"value",
")"... | Set an attribute of this node as Object. This method is backed by
a HashMap, so all rules of HashMap apply to this method.
Fires a PropertyChangeEvent. | [
"Set",
"an",
"attribute",
"of",
"this",
"node",
"as",
"Object",
".",
"This",
"method",
"is",
"backed",
"by",
"a",
"HashMap",
"so",
"all",
"rules",
"of",
"HashMap",
"apply",
"to",
"this",
"method",
".",
"Fires",
"a",
"PropertyChangeEvent",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/tools/org/apache/ojb/tools/mapping/reversedb2/propertyEditors/EditableTreeNodeWithProperties.java#L103-L107 | train |
gsi-upm/BeastTool | beast-tool/src/main/java/es/upm/dit/gsi/beast/mock/jade/listenerMock/ListenerMockAgent.java | ListenerMockAgent.modifyBeliefCount | private void modifyBeliefCount(int count){
introspector.setBeliefValue(getLocalName(), Definitions.RECEIVED_MESSAGE_COUNT, getBeliefCount()+count, null);
} | java | private void modifyBeliefCount(int count){
introspector.setBeliefValue(getLocalName(), Definitions.RECEIVED_MESSAGE_COUNT, getBeliefCount()+count, null);
} | [
"private",
"void",
"modifyBeliefCount",
"(",
"int",
"count",
")",
"{",
"introspector",
".",
"setBeliefValue",
"(",
"getLocalName",
"(",
")",
",",
"Definitions",
".",
"RECEIVED_MESSAGE_COUNT",
",",
"getBeliefCount",
"(",
")",
"+",
"count",
",",
"null",
")",
";"... | Modifies the "msgCount" belief
@param int - the number to add or remove | [
"Modifies",
"the",
"msgCount",
"belief"
] | cc7fdc75cb818c5d60802aaf32c27829e0ca144c | https://github.com/gsi-upm/BeastTool/blob/cc7fdc75cb818c5d60802aaf32c27829e0ca144c/beast-tool/src/main/java/es/upm/dit/gsi/beast/mock/jade/listenerMock/ListenerMockAgent.java#L132-L134 | train |
gsi-upm/BeastTool | beast-tool/src/main/java/es/upm/dit/gsi/beast/mock/jade/listenerMock/ListenerMockAgent.java | ListenerMockAgent.getBeliefCount | private int getBeliefCount() {
Integer count = (Integer)introspector.getBeliefBase(ListenerMockAgent.this).get(Definitions.RECEIVED_MESSAGE_COUNT);
if (count == null) count = 0; // Just in case, not really sure if this is necessary.
return count;
} | java | private int getBeliefCount() {
Integer count = (Integer)introspector.getBeliefBase(ListenerMockAgent.this).get(Definitions.RECEIVED_MESSAGE_COUNT);
if (count == null) count = 0; // Just in case, not really sure if this is necessary.
return count;
} | [
"private",
"int",
"getBeliefCount",
"(",
")",
"{",
"Integer",
"count",
"=",
"(",
"Integer",
")",
"introspector",
".",
"getBeliefBase",
"(",
"ListenerMockAgent",
".",
"this",
")",
".",
"get",
"(",
"Definitions",
".",
"RECEIVED_MESSAGE_COUNT",
")",
";",
"if",
... | Returns the "msgCount" belief
@return int - the count | [
"Returns",
"the",
"msgCount",
"belief"
] | cc7fdc75cb818c5d60802aaf32c27829e0ca144c | https://github.com/gsi-upm/BeastTool/blob/cc7fdc75cb818c5d60802aaf32c27829e0ca144c/beast-tool/src/main/java/es/upm/dit/gsi/beast/mock/jade/listenerMock/ListenerMockAgent.java#L141-L145 | train |
geomajas/geomajas-project-server | plugin/reporting/reporting/src/main/java/org/geomajas/plugin/reporting/mvc/ReportingController.java | ReportingController.addParameters | @SuppressWarnings("unchecked")
private void addParameters(Model model, HttpServletRequest request) {
for (Object objectEntry : request.getParameterMap().entrySet()) {
Map.Entry<String, String[]> entry = (Map.Entry<String, String[]>) objectEntry;
String key = entry.getKey();
String[] values = entry.getValue(... | java | @SuppressWarnings("unchecked")
private void addParameters(Model model, HttpServletRequest request) {
for (Object objectEntry : request.getParameterMap().entrySet()) {
Map.Entry<String, String[]> entry = (Map.Entry<String, String[]>) objectEntry;
String key = entry.getKey();
String[] values = entry.getValue(... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"private",
"void",
"addParameters",
"(",
"Model",
"model",
",",
"HttpServletRequest",
"request",
")",
"{",
"for",
"(",
"Object",
"objectEntry",
":",
"request",
".",
"getParameterMap",
"(",
")",
".",
"entrySet",... | Add the extra parameters which are passed as report parameters. The type of the parameter is "guessed" from the
first letter of the parameter name.
@param model view model
@param request servlet request | [
"Add",
"the",
"extra",
"parameters",
"which",
"are",
"passed",
"as",
"report",
"parameters",
".",
"The",
"type",
"of",
"the",
"parameter",
"is",
"guessed",
"from",
"the",
"first",
"letter",
"of",
"the",
"parameter",
"name",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/plugin/reporting/reporting/src/main/java/org/geomajas/plugin/reporting/mvc/ReportingController.java#L153-L170 | train |
geomajas/geomajas-project-server | plugin/reporting/reporting/src/main/java/org/geomajas/plugin/reporting/mvc/ReportingController.java | ReportingController.getParameter | private Object getParameter(String name, String value) throws ParseException, NumberFormatException {
Object result = null;
if (name.length() > 0) {
switch (name.charAt(0)) {
case 'i':
if (null == value || value.length() == 0) {
value = "0";
}
result = new Integer(value);
break;
... | java | private Object getParameter(String name, String value) throws ParseException, NumberFormatException {
Object result = null;
if (name.length() > 0) {
switch (name.charAt(0)) {
case 'i':
if (null == value || value.length() == 0) {
value = "0";
}
result = new Integer(value);
break;
... | [
"private",
"Object",
"getParameter",
"(",
"String",
"name",
",",
"String",
"value",
")",
"throws",
"ParseException",
",",
"NumberFormatException",
"{",
"Object",
"result",
"=",
"null",
";",
"if",
"(",
"name",
".",
"length",
"(",
")",
">",
"0",
")",
"{",
... | Convert a query parameter to the correct object type based on the first letter of the name.
@param name parameter name
@param value parameter value
@return parameter object as
@throws ParseException value could not be parsed
@throws NumberFormatException value could not be parsed | [
"Convert",
"a",
"query",
"parameter",
"to",
"the",
"correct",
"object",
"type",
"based",
"on",
"the",
"first",
"letter",
"of",
"the",
"name",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/plugin/reporting/reporting/src/main/java/org/geomajas/plugin/reporting/mvc/ReportingController.java#L181-L234 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/accesslayer/sql/SqlGeneratorDefaultImpl.java | SqlGeneratorDefaultImpl.getPreparedDeleteStatement | public SqlStatement getPreparedDeleteStatement(ClassDescriptor cld)
{
SqlForClass sfc = getSqlForClass(cld);
SqlStatement sql = sfc.getDeleteSql();
if(sql == null)
{
ProcedureDescriptor pd = cld.getDeleteProcedure();
if(pd == null)
{
... | java | public SqlStatement getPreparedDeleteStatement(ClassDescriptor cld)
{
SqlForClass sfc = getSqlForClass(cld);
SqlStatement sql = sfc.getDeleteSql();
if(sql == null)
{
ProcedureDescriptor pd = cld.getDeleteProcedure();
if(pd == null)
{
... | [
"public",
"SqlStatement",
"getPreparedDeleteStatement",
"(",
"ClassDescriptor",
"cld",
")",
"{",
"SqlForClass",
"sfc",
"=",
"getSqlForClass",
"(",
"cld",
")",
";",
"SqlStatement",
"sql",
"=",
"sfc",
".",
"getDeleteSql",
"(",
")",
";",
"if",
"(",
"sql",
"==",
... | generate a prepared DELETE-Statement for the Class
described by cld.
@param cld the ClassDescriptor | [
"generate",
"a",
"prepared",
"DELETE",
"-",
"Statement",
"for",
"the",
"Class",
"described",
"by",
"cld",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/sql/SqlGeneratorDefaultImpl.java#L75-L100 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/accesslayer/sql/SqlGeneratorDefaultImpl.java | SqlGeneratorDefaultImpl.getPreparedInsertStatement | public SqlStatement getPreparedInsertStatement(ClassDescriptor cld)
{
SqlStatement sql;
SqlForClass sfc = getSqlForClass(cld);
sql = sfc.getInsertSql();
if(sql == null)
{
ProcedureDescriptor pd = cld.getInsertProcedure();
if(pd == null)
... | java | public SqlStatement getPreparedInsertStatement(ClassDescriptor cld)
{
SqlStatement sql;
SqlForClass sfc = getSqlForClass(cld);
sql = sfc.getInsertSql();
if(sql == null)
{
ProcedureDescriptor pd = cld.getInsertProcedure();
if(pd == null)
... | [
"public",
"SqlStatement",
"getPreparedInsertStatement",
"(",
"ClassDescriptor",
"cld",
")",
"{",
"SqlStatement",
"sql",
";",
"SqlForClass",
"sfc",
"=",
"getSqlForClass",
"(",
"cld",
")",
";",
"sql",
"=",
"sfc",
".",
"getInsertSql",
"(",
")",
";",
"if",
"(",
... | generate a prepared INSERT-Statement for the Class
described by cld.
@param cld the ClassDescriptor | [
"generate",
"a",
"prepared",
"INSERT",
"-",
"Statement",
"for",
"the",
"Class",
"described",
"by",
"cld",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/sql/SqlGeneratorDefaultImpl.java#L108-L134 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/accesslayer/sql/SqlGeneratorDefaultImpl.java | SqlGeneratorDefaultImpl.getPreparedSelectByPkStatement | public SelectStatement getPreparedSelectByPkStatement(ClassDescriptor cld)
{
SelectStatement sql;
SqlForClass sfc = getSqlForClass(cld);
sql = sfc.getSelectByPKSql();
if(sql == null)
{
sql = new SqlSelectByPkStatement(m_platform, cld, logger);
... | java | public SelectStatement getPreparedSelectByPkStatement(ClassDescriptor cld)
{
SelectStatement sql;
SqlForClass sfc = getSqlForClass(cld);
sql = sfc.getSelectByPKSql();
if(sql == null)
{
sql = new SqlSelectByPkStatement(m_platform, cld, logger);
... | [
"public",
"SelectStatement",
"getPreparedSelectByPkStatement",
"(",
"ClassDescriptor",
"cld",
")",
"{",
"SelectStatement",
"sql",
";",
"SqlForClass",
"sfc",
"=",
"getSqlForClass",
"(",
"cld",
")",
";",
"sql",
"=",
"sfc",
".",
"getSelectByPKSql",
"(",
")",
";",
"... | generate a prepared SELECT-Statement for the Class
described by cld
@param cld the ClassDescriptor | [
"generate",
"a",
"prepared",
"SELECT",
"-",
"Statement",
"for",
"the",
"Class",
"described",
"by",
"cld"
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/sql/SqlGeneratorDefaultImpl.java#L141-L159 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/accesslayer/sql/SqlGeneratorDefaultImpl.java | SqlGeneratorDefaultImpl.getPreparedSelectStatement | public SelectStatement getPreparedSelectStatement(Query query, ClassDescriptor cld)
{
SelectStatement sql = new SqlSelectStatement(m_platform, cld, query, logger);
if (logger.isDebugEnabled())
{
logger.debug("SQL:" + sql.getStatement());
}
return sql;
... | java | public SelectStatement getPreparedSelectStatement(Query query, ClassDescriptor cld)
{
SelectStatement sql = new SqlSelectStatement(m_platform, cld, query, logger);
if (logger.isDebugEnabled())
{
logger.debug("SQL:" + sql.getStatement());
}
return sql;
... | [
"public",
"SelectStatement",
"getPreparedSelectStatement",
"(",
"Query",
"query",
",",
"ClassDescriptor",
"cld",
")",
"{",
"SelectStatement",
"sql",
"=",
"new",
"SqlSelectStatement",
"(",
"m_platform",
",",
"cld",
",",
"query",
",",
"logger",
")",
";",
"if",
"("... | generate a select-Statement according to query
@param query the Query
@param cld the ClassDescriptor | [
"generate",
"a",
"select",
"-",
"Statement",
"according",
"to",
"query"
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/sql/SqlGeneratorDefaultImpl.java#L186-L194 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/accesslayer/sql/SqlGeneratorDefaultImpl.java | SqlGeneratorDefaultImpl.getPreparedUpdateStatement | public SqlStatement getPreparedUpdateStatement(ClassDescriptor cld)
{
SqlForClass sfc = getSqlForClass(cld);
SqlStatement result = sfc.getUpdateSql();
if(result == null)
{
ProcedureDescriptor pd = cld.getUpdateProcedure();
if(pd == null)
... | java | public SqlStatement getPreparedUpdateStatement(ClassDescriptor cld)
{
SqlForClass sfc = getSqlForClass(cld);
SqlStatement result = sfc.getUpdateSql();
if(result == null)
{
ProcedureDescriptor pd = cld.getUpdateProcedure();
if(pd == null)
... | [
"public",
"SqlStatement",
"getPreparedUpdateStatement",
"(",
"ClassDescriptor",
"cld",
")",
"{",
"SqlForClass",
"sfc",
"=",
"getSqlForClass",
"(",
"cld",
")",
";",
"SqlStatement",
"result",
"=",
"sfc",
".",
"getUpdateSql",
"(",
")",
";",
"if",
"(",
"result",
"... | generate a prepared UPDATE-Statement for the Class
described by cld
@param cld the ClassDescriptor | [
"generate",
"a",
"prepared",
"UPDATE",
"-",
"Statement",
"for",
"the",
"Class",
"described",
"by",
"cld"
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/sql/SqlGeneratorDefaultImpl.java#L201-L226 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/accesslayer/sql/SqlGeneratorDefaultImpl.java | SqlGeneratorDefaultImpl.toSQLClause | private String toSQLClause(FieldCriteria c, ClassDescriptor cld)
{
String colName = toSqlClause(c.getAttribute(), cld);
return colName + c.getClause() + c.getValue();
} | java | private String toSQLClause(FieldCriteria c, ClassDescriptor cld)
{
String colName = toSqlClause(c.getAttribute(), cld);
return colName + c.getClause() + c.getValue();
} | [
"private",
"String",
"toSQLClause",
"(",
"FieldCriteria",
"c",
",",
"ClassDescriptor",
"cld",
")",
"{",
"String",
"colName",
"=",
"toSqlClause",
"(",
"c",
".",
"getAttribute",
"(",
")",
",",
"cld",
")",
";",
"return",
"colName",
"+",
"c",
".",
"getClause",... | Answer the SQL-Clause for a FieldCriteria
@param c FieldCriteria
@param cld ClassDescriptor | [
"Answer",
"the",
"SQL",
"-",
"Clause",
"for",
"a",
"FieldCriteria"
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/sql/SqlGeneratorDefaultImpl.java#L457-L461 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/accesslayer/sql/SqlGeneratorDefaultImpl.java | SqlGeneratorDefaultImpl.getPreparedDeleteStatement | public SqlStatement getPreparedDeleteStatement(Query query, ClassDescriptor cld)
{
return new SqlDeleteByQuery(m_platform, cld, query, logger);
} | java | public SqlStatement getPreparedDeleteStatement(Query query, ClassDescriptor cld)
{
return new SqlDeleteByQuery(m_platform, cld, query, logger);
} | [
"public",
"SqlStatement",
"getPreparedDeleteStatement",
"(",
"Query",
"query",
",",
"ClassDescriptor",
"cld",
")",
"{",
"return",
"new",
"SqlDeleteByQuery",
"(",
"m_platform",
",",
"cld",
",",
"query",
",",
"logger",
")",
";",
"}"
] | generate a prepared DELETE-Statement according to query
@param query the Query
@param cld the ClassDescriptor | [
"generate",
"a",
"prepared",
"DELETE",
"-",
"Statement",
"according",
"to",
"query"
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/sql/SqlGeneratorDefaultImpl.java#L557-L560 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/otm/core/ConcreteEditingContext.java | ConcreteEditingContext.hasBidirectionalAssociation | private boolean hasBidirectionalAssociation(Class clazz)
{
ClassDescriptor cdesc;
Collection refs;
boolean hasBidirAssc;
if (_withoutBidirAssc.contains(clazz))
{
return false;
}
if (_withBidirAssc.contains(clazz))
{
... | java | private boolean hasBidirectionalAssociation(Class clazz)
{
ClassDescriptor cdesc;
Collection refs;
boolean hasBidirAssc;
if (_withoutBidirAssc.contains(clazz))
{
return false;
}
if (_withBidirAssc.contains(clazz))
{
... | [
"private",
"boolean",
"hasBidirectionalAssociation",
"(",
"Class",
"clazz",
")",
"{",
"ClassDescriptor",
"cdesc",
";",
"Collection",
"refs",
";",
"boolean",
"hasBidirAssc",
";",
"if",
"(",
"_withoutBidirAssc",
".",
"contains",
"(",
"clazz",
")",
")",
"{",
"retur... | Does the given class has bidirectional assiciation
with some other class? | [
"Does",
"the",
"given",
"class",
"has",
"bidirectional",
"assiciation",
"with",
"some",
"other",
"class?"
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/otm/core/ConcreteEditingContext.java#L1225-L1277 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/otm/core/ConcreteEditingContext.java | ConcreteEditingContext.handleDependentReferences | private ArrayList handleDependentReferences(Identity oid, Object userObject,
Object[] origFields, Object[] newFields, Object[] newRefs)
throws LockingException
{
ClassDescriptor mif = _pb.getClassDescriptor(userObject.getClass());
FieldDescriptor[] fieldDescs = mif.getFi... | java | private ArrayList handleDependentReferences(Identity oid, Object userObject,
Object[] origFields, Object[] newFields, Object[] newRefs)
throws LockingException
{
ClassDescriptor mif = _pb.getClassDescriptor(userObject.getClass());
FieldDescriptor[] fieldDescs = mif.getFi... | [
"private",
"ArrayList",
"handleDependentReferences",
"(",
"Identity",
"oid",
",",
"Object",
"userObject",
",",
"Object",
"[",
"]",
"origFields",
",",
"Object",
"[",
"]",
"newFields",
",",
"Object",
"[",
"]",
"newRefs",
")",
"throws",
"LockingException",
"{",
"... | Mark for creation all newly introduced dependent references.
Mark for deletion all nullified dependent references.
@return the list of created objects | [
"Mark",
"for",
"creation",
"all",
"newly",
"introduced",
"dependent",
"references",
".",
"Mark",
"for",
"deletion",
"all",
"nullified",
"dependent",
"references",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/otm/core/ConcreteEditingContext.java#L1331-L1371 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/otm/core/ConcreteEditingContext.java | ConcreteEditingContext.handleDependentCollections | private ArrayList handleDependentCollections(Identity oid, Object obj,
Object[] origCollections, Object[] newCollections,
Object[] newCollectionsOfObjects)
throws LockingException
{
ClassDescriptor mif = _pb.getClassDescriptor(obj.getClass());
Collection col... | java | private ArrayList handleDependentCollections(Identity oid, Object obj,
Object[] origCollections, Object[] newCollections,
Object[] newCollectionsOfObjects)
throws LockingException
{
ClassDescriptor mif = _pb.getClassDescriptor(obj.getClass());
Collection col... | [
"private",
"ArrayList",
"handleDependentCollections",
"(",
"Identity",
"oid",
",",
"Object",
"obj",
",",
"Object",
"[",
"]",
"origCollections",
",",
"Object",
"[",
"]",
"newCollections",
",",
"Object",
"[",
"]",
"newCollectionsOfObjects",
")",
"throws",
"LockingEx... | Mark for creation all objects that were included into dependent collections.
Mark for deletion all objects that were excluded from dependent collections. | [
"Mark",
"for",
"creation",
"all",
"objects",
"that",
"were",
"included",
"into",
"dependent",
"collections",
".",
"Mark",
"for",
"deletion",
"all",
"objects",
"that",
"were",
"excluded",
"from",
"dependent",
"collections",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/otm/core/ConcreteEditingContext.java#L1377-L1437 | train |
geomajas/geomajas-project-server | common-servlet/src/main/java/org/geomajas/spring/ReconfigurableClassPathApplicationContext.java | ReconfigurableClassPathApplicationContext.refresh | public void refresh(String[] configLocations) throws GeomajasException {
try {
setConfigLocations(configLocations);
refresh();
} catch (Exception e) {
throw new GeomajasException(e, ExceptionCode.REFRESH_CONFIGURATION_FAILED);
}
} | java | public void refresh(String[] configLocations) throws GeomajasException {
try {
setConfigLocations(configLocations);
refresh();
} catch (Exception e) {
throw new GeomajasException(e, ExceptionCode.REFRESH_CONFIGURATION_FAILED);
}
} | [
"public",
"void",
"refresh",
"(",
"String",
"[",
"]",
"configLocations",
")",
"throws",
"GeomajasException",
"{",
"try",
"{",
"setConfigLocations",
"(",
"configLocations",
")",
";",
"refresh",
"(",
")",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"... | Refresh this context with the specified configuration locations.
@param configLocations
list of configuration resources (see implementation for specifics)
@throws GeomajasException
indicates a problem with the new location files (see cause) | [
"Refresh",
"this",
"context",
"with",
"the",
"specified",
"configuration",
"locations",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/common-servlet/src/main/java/org/geomajas/spring/ReconfigurableClassPathApplicationContext.java#L54-L61 | train |
geomajas/geomajas-project-server | common-servlet/src/main/java/org/geomajas/spring/ReconfigurableClassPathApplicationContext.java | ReconfigurableClassPathApplicationContext.rollback | public void rollback() throws GeomajasException {
try {
setConfigLocations(previousConfigLocations);
refresh();
} catch (Exception e) {
throw new GeomajasException(e, ExceptionCode.REFRESH_CONFIGURATION_FAILED);
}
} | java | public void rollback() throws GeomajasException {
try {
setConfigLocations(previousConfigLocations);
refresh();
} catch (Exception e) {
throw new GeomajasException(e, ExceptionCode.REFRESH_CONFIGURATION_FAILED);
}
} | [
"public",
"void",
"rollback",
"(",
")",
"throws",
"GeomajasException",
"{",
"try",
"{",
"setConfigLocations",
"(",
"previousConfigLocations",
")",
";",
"refresh",
"(",
")",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"throw",
"new",
"GeomajasException"... | Roll back to the previous configuration.
@throws GeomajasException
indicates an unlikely problem with the rollback (see cause) | [
"Roll",
"back",
"to",
"the",
"previous",
"configuration",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/common-servlet/src/main/java/org/geomajas/spring/ReconfigurableClassPathApplicationContext.java#L69-L76 | train |
Axway/Grapes | server/src/main/java/org/axway/grapes/server/config/GrapesServerConfig.java | GrapesServerConfig.getUrl | public String getUrl(){
final StringBuilder sb = new StringBuilder();
sb.append("http://");
sb.append(getHttpConfiguration().getBindHost().get());
sb.append(":");
sb.append(getHttpConfiguration().getPort());
return sb.toString();
} | java | public String getUrl(){
final StringBuilder sb = new StringBuilder();
sb.append("http://");
sb.append(getHttpConfiguration().getBindHost().get());
sb.append(":");
sb.append(getHttpConfiguration().getPort());
return sb.toString();
} | [
"public",
"String",
"getUrl",
"(",
")",
"{",
"final",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"sb",
".",
"append",
"(",
"\"http://\"",
")",
";",
"sb",
".",
"append",
"(",
"getHttpConfiguration",
"(",
")",
".",
"getBindHost",
"(... | Returns the complete Grapes root URL
@return String | [
"Returns",
"the",
"complete",
"Grapes",
"root",
"URL"
] | ce9cc73d85f83eaa5fbc991abb593915a8c8374e | https://github.com/Axway/Grapes/blob/ce9cc73d85f83eaa5fbc991abb593915a8c8374e/server/src/main/java/org/axway/grapes/server/config/GrapesServerConfig.java#L102-L110 | train |
Axway/Grapes | server/src/main/java/org/axway/grapes/server/webapp/views/utils/Table.java | Table.addRow | public void addRow(final String... cells){
final Row row = new Row((Object[]) cells);
if(!rows.contains(row)){
rows.add(row);
}
} | java | public void addRow(final String... cells){
final Row row = new Row((Object[]) cells);
if(!rows.contains(row)){
rows.add(row);
}
} | [
"public",
"void",
"addRow",
"(",
"final",
"String",
"...",
"cells",
")",
"{",
"final",
"Row",
"row",
"=",
"new",
"Row",
"(",
"(",
"Object",
"[",
"]",
")",
"cells",
")",
";",
"if",
"(",
"!",
"rows",
".",
"contains",
"(",
"row",
")",
")",
"{",
"r... | Add a row to the table if it does not already exist
@param cells String... | [
"Add",
"a",
"row",
"to",
"the",
"table",
"if",
"it",
"does",
"not",
"already",
"exist"
] | ce9cc73d85f83eaa5fbc991abb593915a8c8374e | https://github.com/Axway/Grapes/blob/ce9cc73d85f83eaa5fbc991abb593915a8c8374e/server/src/main/java/org/axway/grapes/server/webapp/views/utils/Table.java#L31-L37 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/util/sequence/SequenceManagerHelper.java | SequenceManagerHelper.firstFoundTableName | private static String firstFoundTableName(PersistenceBroker brokerForClass, ClassDescriptor cld)
{
String name = null;
if (!cld.isInterface() && cld.getFullTableName() != null)
{
return cld.getFullTableName();
}
if (cld.isExtent())
{
C... | java | private static String firstFoundTableName(PersistenceBroker brokerForClass, ClassDescriptor cld)
{
String name = null;
if (!cld.isInterface() && cld.getFullTableName() != null)
{
return cld.getFullTableName();
}
if (cld.isExtent())
{
C... | [
"private",
"static",
"String",
"firstFoundTableName",
"(",
"PersistenceBroker",
"brokerForClass",
",",
"ClassDescriptor",
"cld",
")",
"{",
"String",
"name",
"=",
"null",
";",
"if",
"(",
"!",
"cld",
".",
"isInterface",
"(",
")",
"&&",
"cld",
".",
"getFullTableN... | try to find the first none null table name for the given class-descriptor.
If cld has extent classes, all of these cld's searched for the first none null
table name. | [
"try",
"to",
"find",
"the",
"first",
"none",
"null",
"table",
"name",
"for",
"the",
"given",
"class",
"-",
"descriptor",
".",
"If",
"cld",
"has",
"extent",
"classes",
"all",
"of",
"these",
"cld",
"s",
"searched",
"for",
"the",
"first",
"none",
"null",
... | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/util/sequence/SequenceManagerHelper.java#L220-L238 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/util/sequence/SequenceManagerHelper.java | SequenceManagerHelper.getMaxId | public static long getMaxId(PersistenceBroker brokerForClass, Class topLevel, FieldDescriptor original) throws PersistenceBrokerException
{
long max = 0;
long tmp;
ClassDescriptor cld = brokerForClass.getClassDescriptor(topLevel);
// if class is not an interface / not abstract... | java | public static long getMaxId(PersistenceBroker brokerForClass, Class topLevel, FieldDescriptor original) throws PersistenceBrokerException
{
long max = 0;
long tmp;
ClassDescriptor cld = brokerForClass.getClassDescriptor(topLevel);
// if class is not an interface / not abstract... | [
"public",
"static",
"long",
"getMaxId",
"(",
"PersistenceBroker",
"brokerForClass",
",",
"Class",
"topLevel",
",",
"FieldDescriptor",
"original",
")",
"throws",
"PersistenceBrokerException",
"{",
"long",
"max",
"=",
"0",
";",
"long",
"tmp",
";",
"ClassDescriptor",
... | Search down all extent classes and return max of all found
PK values. | [
"Search",
"down",
"all",
"extent",
"classes",
"and",
"return",
"max",
"of",
"all",
"found",
"PK",
"values",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/util/sequence/SequenceManagerHelper.java#L265-L305 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/util/sequence/SequenceManagerHelper.java | SequenceManagerHelper.getMaxIdForClass | public static long getMaxIdForClass(
PersistenceBroker brokerForClass, ClassDescriptor cldForOriginalOrExtent, FieldDescriptor original)
throws PersistenceBrokerException
{
FieldDescriptor field = null;
if (!original.getClassDescriptor().equals(cldForOriginalOrExtent))
... | java | public static long getMaxIdForClass(
PersistenceBroker brokerForClass, ClassDescriptor cldForOriginalOrExtent, FieldDescriptor original)
throws PersistenceBrokerException
{
FieldDescriptor field = null;
if (!original.getClassDescriptor().equals(cldForOriginalOrExtent))
... | [
"public",
"static",
"long",
"getMaxIdForClass",
"(",
"PersistenceBroker",
"brokerForClass",
",",
"ClassDescriptor",
"cldForOriginalOrExtent",
",",
"FieldDescriptor",
"original",
")",
"throws",
"PersistenceBrokerException",
"{",
"FieldDescriptor",
"field",
"=",
"null",
";",
... | lookup current maximum value for a single field in
table the given class descriptor was associated. | [
"lookup",
"current",
"maximum",
"value",
"for",
"a",
"single",
"field",
"in",
"table",
"the",
"given",
"class",
"descriptor",
"was",
"associated",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/util/sequence/SequenceManagerHelper.java#L311-L370 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/Identity.java | Identity.fromByteArray | public static Identity fromByteArray(final byte[] anArray) throws PersistenceBrokerException
{
// reverse of the serialize() algorithm:
// read from byte[] with a ByteArrayInputStream, decompress with
// a GZIPInputStream and then deserialize by reading from the ObjectInputStream
... | java | public static Identity fromByteArray(final byte[] anArray) throws PersistenceBrokerException
{
// reverse of the serialize() algorithm:
// read from byte[] with a ByteArrayInputStream, decompress with
// a GZIPInputStream and then deserialize by reading from the ObjectInputStream
... | [
"public",
"static",
"Identity",
"fromByteArray",
"(",
"final",
"byte",
"[",
"]",
"anArray",
")",
"throws",
"PersistenceBrokerException",
"{",
"// reverse of the serialize() algorithm:\r",
"// read from byte[] with a ByteArrayInputStream, decompress with\r",
"// a GZIPInputStream and ... | Factory method that returns an Identity object created from a serializated representation.
@param anArray The serialized representation
@return The identity
@see {@link #serialize}.
@deprecated | [
"Factory",
"method",
"that",
"returns",
"an",
"Identity",
"object",
"created",
"from",
"a",
"serializated",
"representation",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/Identity.java#L245-L265 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/Identity.java | Identity.serialize | public byte[] serialize() throws PersistenceBrokerException
{
// Identity is serialized and written to an ObjectOutputStream
// This ObjectOutputstream is compressed by a GZIPOutputStream
// and finally written to a ByteArrayOutputStream.
// the resulting byte[] is returned
... | java | public byte[] serialize() throws PersistenceBrokerException
{
// Identity is serialized and written to an ObjectOutputStream
// This ObjectOutputstream is compressed by a GZIPOutputStream
// and finally written to a ByteArrayOutputStream.
// the resulting byte[] is returned
... | [
"public",
"byte",
"[",
"]",
"serialize",
"(",
")",
"throws",
"PersistenceBrokerException",
"{",
"// Identity is serialized and written to an ObjectOutputStream\r",
"// This ObjectOutputstream is compressed by a GZIPOutputStream\r",
"// and finally written to a ByteArrayOutputStream.\r",
"/... | Return the serialized form of this Identity.
@return The serialized representation
@see #fromByteArray
@deprecated | [
"Return",
"the",
"serialized",
"form",
"of",
"this",
"Identity",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/Identity.java#L316-L337 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/Identity.java | Identity.checkForPrimaryKeys | protected void checkForPrimaryKeys(final Object realObject) throws ClassNotPersistenceCapableException
{
// if no PKs are specified OJB can't handle this class !
if (m_pkValues == null || m_pkValues.length == 0)
{
throw createException("OJB needs at least one primary key att... | java | protected void checkForPrimaryKeys(final Object realObject) throws ClassNotPersistenceCapableException
{
// if no PKs are specified OJB can't handle this class !
if (m_pkValues == null || m_pkValues.length == 0)
{
throw createException("OJB needs at least one primary key att... | [
"protected",
"void",
"checkForPrimaryKeys",
"(",
"final",
"Object",
"realObject",
")",
"throws",
"ClassNotPersistenceCapableException",
"{",
"// if no PKs are specified OJB can't handle this class !\r",
"if",
"(",
"m_pkValues",
"==",
"null",
"||",
"m_pkValues",
".",
"length",... | OJB can handle only classes that declare at least one primary key attribute,
this method checks this condition.
@param realObject The real object to check
@throws ClassNotPersistenceCapableException thrown if no primary key is specified for the objects class | [
"OJB",
"can",
"handle",
"only",
"classes",
"that",
"declare",
"at",
"least",
"one",
"primary",
"key",
"attribute",
"this",
"method",
"checks",
"this",
"condition",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/Identity.java#L369-L379 | train |
geomajas/geomajas-project-server | plugin/layer-tms/tms/src/main/java/org/geomajas/layer/tms/TmsConfigurationService.java | TmsConfigurationService.getCapabilities | public TileMap getCapabilities(TmsLayer layer) throws TmsLayerException {
try {
// Create a JaxB unmarshaller:
JAXBContext context = JAXBContext.newInstance(TileMap.class);
Unmarshaller um = context.createUnmarshaller();
// Find out where to retrieve the capabilities and unmarshall:
if (layer.getBaseT... | java | public TileMap getCapabilities(TmsLayer layer) throws TmsLayerException {
try {
// Create a JaxB unmarshaller:
JAXBContext context = JAXBContext.newInstance(TileMap.class);
Unmarshaller um = context.createUnmarshaller();
// Find out where to retrieve the capabilities and unmarshall:
if (layer.getBaseT... | [
"public",
"TileMap",
"getCapabilities",
"(",
"TmsLayer",
"layer",
")",
"throws",
"TmsLayerException",
"{",
"try",
"{",
"// Create a JaxB unmarshaller:",
"JAXBContext",
"context",
"=",
"JAXBContext",
".",
"newInstance",
"(",
"TileMap",
".",
"class",
")",
";",
"Unmars... | Get the configuration for a TMS layer by retrieving and parsing it's XML description file. The parsing is done
using JaxB.
@param layer the tms layer to get capabilities for.
@return Returns the description as a Java configuration object.
@throws TmsLayerException
In case something went wrong trying to find or parse th... | [
"Get",
"the",
"configuration",
"for",
"a",
"TMS",
"layer",
"by",
"retrieving",
"and",
"parsing",
"it",
"s",
"XML",
"description",
"file",
".",
"The",
"parsing",
"is",
"done",
"using",
"JaxB",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/plugin/layer-tms/tms/src/main/java/org/geomajas/layer/tms/TmsConfigurationService.java#L57-L96 | train |
geomajas/geomajas-project-server | plugin/layer-tms/tms/src/main/java/org/geomajas/layer/tms/TmsConfigurationService.java | TmsConfigurationService.asLayerInfo | public RasterLayerInfo asLayerInfo(TileMap tileMap) {
RasterLayerInfo layerInfo = new RasterLayerInfo();
layerInfo.setCrs(tileMap.getSrs());
layerInfo.setDataSourceName(tileMap.getTitle());
layerInfo.setLayerType(LayerType.RASTER);
layerInfo.setMaxExtent(asBbox(tileMap.getBoundingBox()));
layerInfo.setTile... | java | public RasterLayerInfo asLayerInfo(TileMap tileMap) {
RasterLayerInfo layerInfo = new RasterLayerInfo();
layerInfo.setCrs(tileMap.getSrs());
layerInfo.setDataSourceName(tileMap.getTitle());
layerInfo.setLayerType(LayerType.RASTER);
layerInfo.setMaxExtent(asBbox(tileMap.getBoundingBox()));
layerInfo.setTile... | [
"public",
"RasterLayerInfo",
"asLayerInfo",
"(",
"TileMap",
"tileMap",
")",
"{",
"RasterLayerInfo",
"layerInfo",
"=",
"new",
"RasterLayerInfo",
"(",
")",
";",
"layerInfo",
".",
"setCrs",
"(",
"tileMap",
".",
"getSrs",
"(",
")",
")",
";",
"layerInfo",
".",
"s... | Transform a TMS layer description object into a raster layer info object.
@param tileMap
The TMS layer description object.
@return The raster layer info object as used by Geomajas. | [
"Transform",
"a",
"TMS",
"layer",
"description",
"object",
"into",
"a",
"raster",
"layer",
"info",
"object",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/plugin/layer-tms/tms/src/main/java/org/geomajas/layer/tms/TmsConfigurationService.java#L105-L122 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/accesslayer/ReportQueryRsIterator.java | ReportQueryRsIterator.init_jdbcTypes | private void init_jdbcTypes() throws SQLException
{
ReportQuery q = (ReportQuery) getQueryObject().getQuery();
m_jdbcTypes = new int[m_attributeCount];
// try to get jdbcTypes from Query
if (q.getJdbcTypes() != null)
{
m_jdbcTypes = q.getJdbcTypes... | java | private void init_jdbcTypes() throws SQLException
{
ReportQuery q = (ReportQuery) getQueryObject().getQuery();
m_jdbcTypes = new int[m_attributeCount];
// try to get jdbcTypes from Query
if (q.getJdbcTypes() != null)
{
m_jdbcTypes = q.getJdbcTypes... | [
"private",
"void",
"init_jdbcTypes",
"(",
")",
"throws",
"SQLException",
"{",
"ReportQuery",
"q",
"=",
"(",
"ReportQuery",
")",
"getQueryObject",
"(",
")",
".",
"getQuery",
"(",
")",
";",
"m_jdbcTypes",
"=",
"new",
"int",
"[",
"m_attributeCount",
"]",
";",
... | get the jdbcTypes from the Query or the ResultSet if not available from the Query
@throws SQLException | [
"get",
"the",
"jdbcTypes",
"from",
"the",
"Query",
"or",
"the",
"ResultSet",
"if",
"not",
"available",
"from",
"the",
"Query"
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/ReportQueryRsIterator.java#L65-L84 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/ant/RepositoryVerifierHandler.java | RepositoryVerifierHandler.getLiteralId | private int getLiteralId(String literal) throws PersistenceBrokerException
{
////logger.debug("lookup: " + literal);
try
{
return tags.getIdByTag(literal);
}
catch (NullPointerException t)
{
throw new MetadataException("unknown literal... | java | private int getLiteralId(String literal) throws PersistenceBrokerException
{
////logger.debug("lookup: " + literal);
try
{
return tags.getIdByTag(literal);
}
catch (NullPointerException t)
{
throw new MetadataException("unknown literal... | [
"private",
"int",
"getLiteralId",
"(",
"String",
"literal",
")",
"throws",
"PersistenceBrokerException",
"{",
"////logger.debug(\"lookup: \" + literal);\r",
"try",
"{",
"return",
"tags",
".",
"getIdByTag",
"(",
"literal",
")",
";",
"}",
"catch",
"(",
"NullPointerExcep... | returns the XmlCapable id associated with the literal.
OJB maintains a RepositoryTags table that provides
a mapping from xml-tags to XmlCapable ids.
@param literal the literal to lookup
@return the int value representing the XmlCapable
@throws MetadataException if no literal was found in tags mapping | [
"returns",
"the",
"XmlCapable",
"id",
"associated",
"with",
"the",
"literal",
".",
"OJB",
"maintains",
"a",
"RepositoryTags",
"table",
"that",
"provides",
"a",
"mapping",
"from",
"xml",
"-",
"tags",
"to",
"XmlCapable",
"ids",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/ant/RepositoryVerifierHandler.java#L108-L120 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/metadata/ProcedureDescriptor.java | ProcedureDescriptor.hasReturnValues | public final boolean hasReturnValues()
{
if (this.hasReturnValue())
{
return true;
}
else
{
// TODO: We may be able to 'pre-calculate' the results
// of this loop by just checking arguments as they are added
// The onl... | java | public final boolean hasReturnValues()
{
if (this.hasReturnValue())
{
return true;
}
else
{
// TODO: We may be able to 'pre-calculate' the results
// of this loop by just checking arguments as they are added
// The onl... | [
"public",
"final",
"boolean",
"hasReturnValues",
"(",
")",
"{",
"if",
"(",
"this",
".",
"hasReturnValue",
"(",
")",
")",
"{",
"return",
"true",
";",
"}",
"else",
"{",
"// TODO: We may be able to 'pre-calculate' the results\r",
"// of this loop by just checking arguments... | Does this procedure return any values to the 'caller'?
@return <code>true</code> if the procedure returns at least 1
value that is returned to the caller. | [
"Does",
"this",
"procedure",
"return",
"any",
"values",
"to",
"the",
"caller",
"?"
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/metadata/ProcedureDescriptor.java#L139-L163 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/metadata/ProcedureDescriptor.java | ProcedureDescriptor.addArguments | protected void addArguments(FieldDescriptor field[])
{
for (int i = 0; i < field.length; i++)
{
ArgumentDescriptor arg = new ArgumentDescriptor(this);
arg.setValue(field[i].getAttributeName(), false);
this.addArgument(arg);
}
} | java | protected void addArguments(FieldDescriptor field[])
{
for (int i = 0; i < field.length; i++)
{
ArgumentDescriptor arg = new ArgumentDescriptor(this);
arg.setValue(field[i].getAttributeName(), false);
this.addArgument(arg);
}
} | [
"protected",
"void",
"addArguments",
"(",
"FieldDescriptor",
"field",
"[",
"]",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"field",
".",
"length",
";",
"i",
"++",
")",
"{",
"ArgumentDescriptor",
"arg",
"=",
"new",
"ArgumentDescriptor",
... | Set up arguments for each FieldDescriptor in an array. | [
"Set",
"up",
"arguments",
"for",
"each",
"FieldDescriptor",
"in",
"an",
"array",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/metadata/ProcedureDescriptor.java#L213-L221 | train |
geomajas/geomajas-project-server | plugin/staticsecurity/staticsecurity-ldap/src/main/java/org/geomajas/plugin/staticsecurity/ldap/LdapAuthenticationService.java | LdapAuthenticationService.setNamedRoles | @Api
public void setNamedRoles(Map<String, List<NamedRoleInfo>> namedRoles) {
this.namedRoles = namedRoles;
ldapRoleMapping = new HashMap<String, Set<String>>();
for (String roleName : namedRoles.keySet()) {
if (!ldapRoleMapping.containsKey(roleName)) {
ldapRoleMapping.put(roleName, new HashSet<String>())... | java | @Api
public void setNamedRoles(Map<String, List<NamedRoleInfo>> namedRoles) {
this.namedRoles = namedRoles;
ldapRoleMapping = new HashMap<String, Set<String>>();
for (String roleName : namedRoles.keySet()) {
if (!ldapRoleMapping.containsKey(roleName)) {
ldapRoleMapping.put(roleName, new HashSet<String>())... | [
"@",
"Api",
"public",
"void",
"setNamedRoles",
"(",
"Map",
"<",
"String",
",",
"List",
"<",
"NamedRoleInfo",
">",
">",
"namedRoles",
")",
"{",
"this",
".",
"namedRoles",
"=",
"namedRoles",
";",
"ldapRoleMapping",
"=",
"new",
"HashMap",
"<",
"String",
",",
... | Set the named roles which may be defined.
@param roles map with roles, keys are the values for {@link #rolesAttribute}, probably DN values
@since 1.10.0 | [
"Set",
"the",
"named",
"roles",
"which",
"may",
"be",
"defined",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/plugin/staticsecurity/staticsecurity-ldap/src/main/java/org/geomajas/plugin/staticsecurity/ldap/LdapAuthenticationService.java#L284-L296 | train |
geomajas/geomajas-project-server | api/src/main/java/org/geomajas/configuration/client/ScaleInfo.java | ScaleInfo.setPixelPerUnit | public void setPixelPerUnit(double pixelPerUnit) {
if (pixelPerUnit < MINIMUM_PIXEL_PER_UNIT) {
pixelPerUnit = MINIMUM_PIXEL_PER_UNIT;
}
if (pixelPerUnit > MAXIMUM_PIXEL_PER_UNIT) {
pixelPerUnit = MAXIMUM_PIXEL_PER_UNIT;
}
this.pixelPerUnit = pixelPerUnit;
setPixelPerUnitBased(true);
postConstruct()... | java | public void setPixelPerUnit(double pixelPerUnit) {
if (pixelPerUnit < MINIMUM_PIXEL_PER_UNIT) {
pixelPerUnit = MINIMUM_PIXEL_PER_UNIT;
}
if (pixelPerUnit > MAXIMUM_PIXEL_PER_UNIT) {
pixelPerUnit = MAXIMUM_PIXEL_PER_UNIT;
}
this.pixelPerUnit = pixelPerUnit;
setPixelPerUnitBased(true);
postConstruct()... | [
"public",
"void",
"setPixelPerUnit",
"(",
"double",
"pixelPerUnit",
")",
"{",
"if",
"(",
"pixelPerUnit",
"<",
"MINIMUM_PIXEL_PER_UNIT",
")",
"{",
"pixelPerUnit",
"=",
"MINIMUM_PIXEL_PER_UNIT",
";",
"}",
"if",
"(",
"pixelPerUnit",
">",
"MAXIMUM_PIXEL_PER_UNIT",
")",
... | Sets the scale value in pixel per map unit.
@param pixelPerUnit
the scale value (pix/map unit) | [
"Sets",
"the",
"scale",
"value",
"in",
"pixel",
"per",
"map",
"unit",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/api/src/main/java/org/geomajas/configuration/client/ScaleInfo.java#L129-L139 | train |
geomajas/geomajas-project-server | api/src/main/java/org/geomajas/configuration/client/ScaleInfo.java | ScaleInfo.postConstruct | @PostConstruct
protected void postConstruct() {
if (pixelPerUnitBased) {
// Calculate numerator and denominator
if (pixelPerUnit > PIXEL_PER_METER) {
this.numerator = pixelPerUnit / conversionFactor;
this.denominator = 1;
} else {
this.numerator = 1;
this.denominator = PIXEL_PER_METER / pixe... | java | @PostConstruct
protected void postConstruct() {
if (pixelPerUnitBased) {
// Calculate numerator and denominator
if (pixelPerUnit > PIXEL_PER_METER) {
this.numerator = pixelPerUnit / conversionFactor;
this.denominator = 1;
} else {
this.numerator = 1;
this.denominator = PIXEL_PER_METER / pixe... | [
"@",
"PostConstruct",
"protected",
"void",
"postConstruct",
"(",
")",
"{",
"if",
"(",
"pixelPerUnitBased",
")",
"{",
"//\tCalculate numerator and denominator",
"if",
"(",
"pixelPerUnit",
">",
"PIXEL_PER_METER",
")",
"{",
"this",
".",
"numerator",
"=",
"pixelPerUnit"... | Finish configuration. | [
"Finish",
"configuration",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/api/src/main/java/org/geomajas/configuration/client/ScaleInfo.java#L230-L247 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/util/batch/BatchConnection.java | BatchConnection.nextExecuted | void nextExecuted(String sql) throws SQLException
{
count++;
if (_order.contains(sql))
{
return;
}
String sqlCmd = sql.substring(0, 7);
String rest = sql.substring(sqlCmd.equals("UPDATE ") ? 7 // "UPDATE "
: 12); // "INSERT INT... | java | void nextExecuted(String sql) throws SQLException
{
count++;
if (_order.contains(sql))
{
return;
}
String sqlCmd = sql.substring(0, 7);
String rest = sql.substring(sqlCmd.equals("UPDATE ") ? 7 // "UPDATE "
: 12); // "INSERT INT... | [
"void",
"nextExecuted",
"(",
"String",
"sql",
")",
"throws",
"SQLException",
"{",
"count",
"++",
";",
"if",
"(",
"_order",
".",
"contains",
"(",
"sql",
")",
")",
"{",
"return",
";",
"}",
"String",
"sqlCmd",
"=",
"sql",
".",
"substring",
"(",
"0",
","... | Remember the order of execution | [
"Remember",
"the",
"order",
"of",
"execution"
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/util/batch/BatchConnection.java#L162-L241 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/util/batch/BatchConnection.java | BatchConnection.prepareBatchStatement | private PreparedStatement prepareBatchStatement(String sql)
{
String sqlCmd = sql.substring(0, 7);
if (sqlCmd.equals("UPDATE ") || sqlCmd.equals("DELETE ") || (_useBatchInserts && sqlCmd.equals("INSERT ")))
{
PreparedStatement stmt = (PreparedStatement) _statements.get(sql... | java | private PreparedStatement prepareBatchStatement(String sql)
{
String sqlCmd = sql.substring(0, 7);
if (sqlCmd.equals("UPDATE ") || sqlCmd.equals("DELETE ") || (_useBatchInserts && sqlCmd.equals("INSERT ")))
{
PreparedStatement stmt = (PreparedStatement) _statements.get(sql... | [
"private",
"PreparedStatement",
"prepareBatchStatement",
"(",
"String",
"sql",
")",
"{",
"String",
"sqlCmd",
"=",
"sql",
".",
"substring",
"(",
"0",
",",
"7",
")",
";",
"if",
"(",
"sqlCmd",
".",
"equals",
"(",
"\"UPDATE \"",
")",
"||",
"sqlCmd",
".",
"eq... | If UPDATE, INSERT or DELETE, return BatchPreparedStatement,
otherwise return null. | [
"If",
"UPDATE",
"INSERT",
"or",
"DELETE",
"return",
"BatchPreparedStatement",
"otherwise",
"return",
"null",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/util/batch/BatchConnection.java#L247-L269 | train |
gsi-upm/BeastTool | beast-tool/src/main/java/es/upm/dit/gsi/beast/reader/system/SystemReader.java | SystemReader.generateJavaFiles | public static void generateJavaFiles(String requirementsFolder,
String platformName, String src_test_dir, String tests_package,
String casemanager_package, String loggingPropFile)
throws Exception {
File reqFolder = new File(requirementsFolder);
if (reqFolder.isDirec... | java | public static void generateJavaFiles(String requirementsFolder,
String platformName, String src_test_dir, String tests_package,
String casemanager_package, String loggingPropFile)
throws Exception {
File reqFolder = new File(requirementsFolder);
if (reqFolder.isDirec... | [
"public",
"static",
"void",
"generateJavaFiles",
"(",
"String",
"requirementsFolder",
",",
"String",
"platformName",
",",
"String",
"src_test_dir",
",",
"String",
"tests_package",
",",
"String",
"casemanager_package",
",",
"String",
"loggingPropFile",
")",
"throws",
"... | Main method of the class, which handles the process of creating the tests
@param requirementsFolder
, it is the folder where the plain text given by the client is
stored
@param platformName
, to choose the MAS platform (JADE, JADEX, etc.)
@param src_test_dir
, the folder where our classes are created
@param tests_pack... | [
"Main",
"method",
"of",
"the",
"class",
"which",
"handles",
"the",
"process",
"of",
"creating",
"the",
"tests"
] | cc7fdc75cb818c5d60802aaf32c27829e0ca144c | https://github.com/gsi-upm/BeastTool/blob/cc7fdc75cb818c5d60802aaf32c27829e0ca144c/beast-tool/src/main/java/es/upm/dit/gsi/beast/reader/system/SystemReader.java#L62-L101 | train |
Axway/Grapes | commons/src/main/java/org/axway/grapes/commons/datamodel/Module.java | Module.setPromoted | public void setPromoted(final boolean promoted) {
this.promoted = promoted;
for (final Artifact artifact : artifacts) {
artifact.setPromoted(promoted);
}
for (final Module suModule : submodules) {
suModule.setPromoted(promoted);
}
} | java | public void setPromoted(final boolean promoted) {
this.promoted = promoted;
for (final Artifact artifact : artifacts) {
artifact.setPromoted(promoted);
}
for (final Module suModule : submodules) {
suModule.setPromoted(promoted);
}
} | [
"public",
"void",
"setPromoted",
"(",
"final",
"boolean",
"promoted",
")",
"{",
"this",
".",
"promoted",
"=",
"promoted",
";",
"for",
"(",
"final",
"Artifact",
"artifact",
":",
"artifacts",
")",
"{",
"artifact",
".",
"setPromoted",
"(",
"promoted",
")",
";... | Sets the promotion state.
<P>INFO: This method updates automatically all the contained artifacts.
@param promoted boolean | [
"Sets",
"the",
"promotion",
"state",
"."
] | ce9cc73d85f83eaa5fbc991abb593915a8c8374e | https://github.com/Axway/Grapes/blob/ce9cc73d85f83eaa5fbc991abb593915a8c8374e/commons/src/main/java/org/axway/grapes/commons/datamodel/Module.java#L94-L104 | train |
Axway/Grapes | commons/src/main/java/org/axway/grapes/commons/datamodel/Module.java | Module.addDependency | public void addDependency(final Dependency dependency) {
if(dependency != null && !dependencies.contains(dependency)){
this.dependencies.add(dependency);
}
} | java | public void addDependency(final Dependency dependency) {
if(dependency != null && !dependencies.contains(dependency)){
this.dependencies.add(dependency);
}
} | [
"public",
"void",
"addDependency",
"(",
"final",
"Dependency",
"dependency",
")",
"{",
"if",
"(",
"dependency",
"!=",
"null",
"&&",
"!",
"dependencies",
".",
"contains",
"(",
"dependency",
")",
")",
"{",
"this",
".",
"dependencies",
".",
"add",
"(",
"depen... | Add a dependency to the module.
@param dependency Dependency | [
"Add",
"a",
"dependency",
"to",
"the",
"module",
"."
] | ce9cc73d85f83eaa5fbc991abb593915a8c8374e | https://github.com/Axway/Grapes/blob/ce9cc73d85f83eaa5fbc991abb593915a8c8374e/commons/src/main/java/org/axway/grapes/commons/datamodel/Module.java#L111-L115 | train |
Axway/Grapes | commons/src/main/java/org/axway/grapes/commons/datamodel/Module.java | Module.addSubmodule | public void addSubmodule(final Module submodule) {
if (!submodules.contains(submodule)) {
submodule.setSubmodule(true);
if (promoted) {
submodule.setPromoted(promoted);
}
submodules.add(submodule);
}
} | java | public void addSubmodule(final Module submodule) {
if (!submodules.contains(submodule)) {
submodule.setSubmodule(true);
if (promoted) {
submodule.setPromoted(promoted);
}
submodules.add(submodule);
}
} | [
"public",
"void",
"addSubmodule",
"(",
"final",
"Module",
"submodule",
")",
"{",
"if",
"(",
"!",
"submodules",
".",
"contains",
"(",
"submodule",
")",
")",
"{",
"submodule",
".",
"setSubmodule",
"(",
"true",
")",
";",
"if",
"(",
"promoted",
")",
"{",
"... | Adds a submodule to the module.
<P>
INFO: If the module is promoted, all added submodule will be promoted.
@param submodule Module | [
"Adds",
"a",
"submodule",
"to",
"the",
"module",
"."
] | ce9cc73d85f83eaa5fbc991abb593915a8c8374e | https://github.com/Axway/Grapes/blob/ce9cc73d85f83eaa5fbc991abb593915a8c8374e/commons/src/main/java/org/axway/grapes/commons/datamodel/Module.java#L125-L135 | train |
Axway/Grapes | commons/src/main/java/org/axway/grapes/commons/datamodel/Module.java | Module.addArtifact | public void addArtifact(final Artifact artifact) {
if (!artifacts.contains(artifact)) {
if (promoted) {
artifact.setPromoted(promoted);
}
artifacts.add(artifact);
}
} | java | public void addArtifact(final Artifact artifact) {
if (!artifacts.contains(artifact)) {
if (promoted) {
artifact.setPromoted(promoted);
}
artifacts.add(artifact);
}
} | [
"public",
"void",
"addArtifact",
"(",
"final",
"Artifact",
"artifact",
")",
"{",
"if",
"(",
"!",
"artifacts",
".",
"contains",
"(",
"artifact",
")",
")",
"{",
"if",
"(",
"promoted",
")",
"{",
"artifact",
".",
"setPromoted",
"(",
"promoted",
")",
";",
"... | Adds an artifact to the module.
<P>
INFO: If the module is promoted, all added artifacts will be promoted.
@param artifact Artifact | [
"Adds",
"an",
"artifact",
"to",
"the",
"module",
"."
] | ce9cc73d85f83eaa5fbc991abb593915a8c8374e | https://github.com/Axway/Grapes/blob/ce9cc73d85f83eaa5fbc991abb593915a8c8374e/commons/src/main/java/org/axway/grapes/commons/datamodel/Module.java#L145-L153 | train |
Axway/Grapes | server/src/main/java/org/axway/grapes/server/config/Messages.java | Messages.get | public static String get(MessageKey key) {
return data.getProperty(key.toString(), key.toString());
} | java | public static String get(MessageKey key) {
return data.getProperty(key.toString(), key.toString());
} | [
"public",
"static",
"String",
"get",
"(",
"MessageKey",
"key",
")",
"{",
"return",
"data",
".",
"getProperty",
"(",
"key",
".",
"toString",
"(",
")",
",",
"key",
".",
"toString",
"(",
")",
")",
";",
"}"
] | Retrieves the configured message by property key
@param key The key in the file
@return The associated value in case the key is found in the message bundle file. If
no such key is defined, the returned value would be the key itself. | [
"Retrieves",
"the",
"configured",
"message",
"by",
"property",
"key"
] | ce9cc73d85f83eaa5fbc991abb593915a8c8374e | https://github.com/Axway/Grapes/blob/ce9cc73d85f83eaa5fbc991abb593915a8c8374e/server/src/main/java/org/axway/grapes/server/config/Messages.java#L37-L39 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.