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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
geomajas/geomajas-project-server | plugin/print/print/src/main/java/org/geomajas/plugin/printing/component/PdfContext.java | PdfContext.drawImage | public void drawImage(Image img, Rectangle rect, Rectangle clipRect) {
drawImage(img, rect, clipRect, 1);
} | java | public void drawImage(Image img, Rectangle rect, Rectangle clipRect) {
drawImage(img, rect, clipRect, 1);
} | [
"public",
"void",
"drawImage",
"(",
"Image",
"img",
",",
"Rectangle",
"rect",
",",
"Rectangle",
"clipRect",
")",
"{",
"drawImage",
"(",
"img",
",",
"rect",
",",
"clipRect",
",",
"1",
")",
";",
"}"
] | Draws the specified image with the first rectangle's bounds, clipping with the second one and adding
transparency.
@param img image
@param rect rectangle
@param clipRect clipping bounds | [
"Draws",
"the",
"specified",
"image",
"with",
"the",
"first",
"rectangle",
"s",
"bounds",
"clipping",
"with",
"the",
"second",
"one",
"and",
"adding",
"transparency",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/plugin/print/print/src/main/java/org/geomajas/plugin/printing/component/PdfContext.java#L389-L391 | train |
geomajas/geomajas-project-server | plugin/print/print/src/main/java/org/geomajas/plugin/printing/component/PdfContext.java | PdfContext.drawImage | public void drawImage(Image img, Rectangle rect, Rectangle clipRect, float opacity) {
try {
template.saveState();
// opacity
PdfGState state = new PdfGState();
state.setFillOpacity(opacity);
state.setBlendMode(PdfGState.BM_NORMAL);
template.setGState(state);
// clipping code
if (clipRect != nu... | java | public void drawImage(Image img, Rectangle rect, Rectangle clipRect, float opacity) {
try {
template.saveState();
// opacity
PdfGState state = new PdfGState();
state.setFillOpacity(opacity);
state.setBlendMode(PdfGState.BM_NORMAL);
template.setGState(state);
// clipping code
if (clipRect != nu... | [
"public",
"void",
"drawImage",
"(",
"Image",
"img",
",",
"Rectangle",
"rect",
",",
"Rectangle",
"clipRect",
",",
"float",
"opacity",
")",
"{",
"try",
"{",
"template",
".",
"saveState",
"(",
")",
";",
"// opacity",
"PdfGState",
"state",
"=",
"new",
"PdfGSta... | Draws the specified image with the first rectangle's bounds, clipping with the second one.
@param img image
@param rect rectangle
@param clipRect clipping bounds
@param opacity opacity of the image (1 = opaque, 0= transparent) | [
"Draws",
"the",
"specified",
"image",
"with",
"the",
"first",
"rectangle",
"s",
"bounds",
"clipping",
"with",
"the",
"second",
"one",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/plugin/print/print/src/main/java/org/geomajas/plugin/printing/component/PdfContext.java#L401-L423 | train |
geomajas/geomajas-project-server | plugin/print/print/src/main/java/org/geomajas/plugin/printing/component/PdfContext.java | PdfContext.drawGeometry | public void drawGeometry(Geometry geometry, SymbolInfo symbol, Color fillColor, Color strokeColor, float lineWidth,
float[] dashArray, Rectangle clipRect) {
template.saveState();
// clipping code
if (clipRect != null) {
template.rectangle(clipRect.getLeft() + origX, clipRect.getBottom() + origY, clipRect.ge... | java | public void drawGeometry(Geometry geometry, SymbolInfo symbol, Color fillColor, Color strokeColor, float lineWidth,
float[] dashArray, Rectangle clipRect) {
template.saveState();
// clipping code
if (clipRect != null) {
template.rectangle(clipRect.getLeft() + origX, clipRect.getBottom() + origY, clipRect.ge... | [
"public",
"void",
"drawGeometry",
"(",
"Geometry",
"geometry",
",",
"SymbolInfo",
"symbol",
",",
"Color",
"fillColor",
",",
"Color",
"strokeColor",
",",
"float",
"lineWidth",
",",
"float",
"[",
"]",
"dashArray",
",",
"Rectangle",
"clipRect",
")",
"{",
"templat... | Draw the specified geometry.
@param geometry geometry to draw
@param symbol symbol for geometry
@param fillColor fill colour
@param strokeColor stroke colour
@param lineWidth line width
@param clipRect clipping rectangle | [
"Draw",
"the",
"specified",
"geometry",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/plugin/print/print/src/main/java/org/geomajas/plugin/printing/component/PdfContext.java#L488-L502 | train |
geomajas/geomajas-project-server | plugin/print/print/src/main/java/org/geomajas/plugin/printing/component/PdfContext.java | PdfContext.toRelative | public Rectangle toRelative(Rectangle rect) {
return new Rectangle(rect.getLeft() - origX, rect.getBottom() - origY, rect.getRight() - origX, rect.getTop()
- origY);
} | java | public Rectangle toRelative(Rectangle rect) {
return new Rectangle(rect.getLeft() - origX, rect.getBottom() - origY, rect.getRight() - origX, rect.getTop()
- origY);
} | [
"public",
"Rectangle",
"toRelative",
"(",
"Rectangle",
"rect",
")",
"{",
"return",
"new",
"Rectangle",
"(",
"rect",
".",
"getLeft",
"(",
")",
"-",
"origX",
",",
"rect",
".",
"getBottom",
"(",
")",
"-",
"origY",
",",
"rect",
".",
"getRight",
"(",
")",
... | Converts an absolute rectangle to a relative one wrt to the current coordinate system.
@param rect absolute rectangle
@return relative rectangle | [
"Converts",
"an",
"absolute",
"rectangle",
"to",
"a",
"relative",
"one",
"wrt",
"to",
"the",
"current",
"coordinate",
"system",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/plugin/print/print/src/main/java/org/geomajas/plugin/printing/component/PdfContext.java#L619-L622 | train |
kuali/ojb-1.0.4 | src/ejb/org/apache/ojb/ejb/odmg/ODMGBaseBeanImpl.java | ODMGBaseBeanImpl.getCount | public int getCount(Class target)
{
PersistenceBroker broker = ((HasBroker) odmg.currentTransaction()).getBroker();
int result = broker.getCount(new QueryByCriteria(target));
return result;
} | java | public int getCount(Class target)
{
PersistenceBroker broker = ((HasBroker) odmg.currentTransaction()).getBroker();
int result = broker.getCount(new QueryByCriteria(target));
return result;
} | [
"public",
"int",
"getCount",
"(",
"Class",
"target",
")",
"{",
"PersistenceBroker",
"broker",
"=",
"(",
"(",
"HasBroker",
")",
"odmg",
".",
"currentTransaction",
"(",
")",
")",
".",
"getBroker",
"(",
")",
";",
"int",
"result",
"=",
"broker",
".",
"getCou... | Return the count of all objects found
for given class, using the PB-api within
ODMG - this may change in further versions. | [
"Return",
"the",
"count",
"of",
"all",
"objects",
"found",
"for",
"given",
"class",
"using",
"the",
"PB",
"-",
"api",
"within",
"ODMG",
"-",
"this",
"may",
"change",
"in",
"further",
"versions",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/ejb/org/apache/ojb/ejb/odmg/ODMGBaseBeanImpl.java#L170-L175 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/ant/VerifyMappingsTask.java | VerifyMappingsTask.setClasspath | public void setClasspath(Path classpath)
{
if (_classpath == null)
{
_classpath = classpath;
}
else
{
_classpath.append(classpath);
}
log("Verification classpath is "+ _classpath,
Project.MSG_VERBOSE);
} | java | public void setClasspath(Path classpath)
{
if (_classpath == null)
{
_classpath = classpath;
}
else
{
_classpath.append(classpath);
}
log("Verification classpath is "+ _classpath,
Project.MSG_VERBOSE);
} | [
"public",
"void",
"setClasspath",
"(",
"Path",
"classpath",
")",
"{",
"if",
"(",
"_classpath",
"==",
"null",
")",
"{",
"_classpath",
"=",
"classpath",
";",
"}",
"else",
"{",
"_classpath",
".",
"append",
"(",
"classpath",
")",
";",
"}",
"log",
"(",
"\"V... | Set the classpath for loading the driver.
@param classpath the classpath | [
"Set",
"the",
"classpath",
"for",
"loading",
"the",
"driver",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/ant/VerifyMappingsTask.java#L280-L292 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/ant/VerifyMappingsTask.java | VerifyMappingsTask.setClasspathRef | public void setClasspathRef(Reference r)
{
createClasspath().setRefid(r);
log("Verification classpath is "+ _classpath,
Project.MSG_VERBOSE);
} | java | public void setClasspathRef(Reference r)
{
createClasspath().setRefid(r);
log("Verification classpath is "+ _classpath,
Project.MSG_VERBOSE);
} | [
"public",
"void",
"setClasspathRef",
"(",
"Reference",
"r",
")",
"{",
"createClasspath",
"(",
")",
".",
"setRefid",
"(",
"r",
")",
";",
"log",
"(",
"\"Verification classpath is \"",
"+",
"_classpath",
",",
"Project",
".",
"MSG_VERBOSE",
")",
";",
"}"
] | Set the classpath for loading the driver using the classpath reference.
@param r reference to the classpath | [
"Set",
"the",
"classpath",
"for",
"loading",
"the",
"driver",
"using",
"the",
"classpath",
"reference",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/ant/VerifyMappingsTask.java#L313-L318 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/ant/VerifyMappingsTask.java | VerifyMappingsTask.getPersistentFieldClass | public Class getPersistentFieldClass()
{
if (m_persistenceClass == null)
{
Properties properties = new Properties();
try
{
this.logWarning("Loading properties file: " + getPropertiesFile());
properties.load(new FileInputStre... | java | public Class getPersistentFieldClass()
{
if (m_persistenceClass == null)
{
Properties properties = new Properties();
try
{
this.logWarning("Loading properties file: " + getPropertiesFile());
properties.load(new FileInputStre... | [
"public",
"Class",
"getPersistentFieldClass",
"(",
")",
"{",
"if",
"(",
"m_persistenceClass",
"==",
"null",
")",
"{",
"Properties",
"properties",
"=",
"new",
"Properties",
"(",
")",
";",
"try",
"{",
"this",
".",
"logWarning",
"(",
"\"Loading properties file: \""... | Returns the Class object of the class specified in the OJB.properties
file for the "PersistentFieldClass" property.
@return Class The Class object of the "PersistentFieldClass" class
specified in the OJB.properties file. | [
"Returns",
"the",
"Class",
"object",
"of",
"the",
"class",
"specified",
"in",
"the",
"OJB",
".",
"properties",
"file",
"for",
"the",
"PersistentFieldClass",
"property",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/ant/VerifyMappingsTask.java#L468-L498 | train |
geomajas/geomajas-project-server | plugin/rasterizing/rasterizing/src/main/java/org/geomajas/plugin/rasterizing/sld/SymbolizerFilterVisitor.java | SymbolizerFilterVisitor.visit | @Override
public void visit(FeatureTypeStyle fts) {
FeatureTypeStyle copy = new FeatureTypeStyleImpl(
(FeatureTypeStyleImpl) fts);
Rule[] rules = fts.getRules();
int length = rules.length;
Rule[] rulesCopy = new Rule[length];
for (int i = 0; i < length; i++) {
if (rules[i] != null) {
rules[i].acc... | java | @Override
public void visit(FeatureTypeStyle fts) {
FeatureTypeStyle copy = new FeatureTypeStyleImpl(
(FeatureTypeStyleImpl) fts);
Rule[] rules = fts.getRules();
int length = rules.length;
Rule[] rulesCopy = new Rule[length];
for (int i = 0; i < length; i++) {
if (rules[i] != null) {
rules[i].acc... | [
"@",
"Override",
"public",
"void",
"visit",
"(",
"FeatureTypeStyle",
"fts",
")",
"{",
"FeatureTypeStyle",
"copy",
"=",
"new",
"FeatureTypeStyleImpl",
"(",
"(",
"FeatureTypeStyleImpl",
")",
"fts",
")",
";",
"Rule",
"[",
"]",
"rules",
"=",
"fts",
".",
"getRule... | Overridden to add transform. | [
"Overridden",
"to",
"add",
"transform",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/plugin/rasterizing/rasterizing/src/main/java/org/geomajas/plugin/rasterizing/sld/SymbolizerFilterVisitor.java#L49-L72 | train |
geomajas/geomajas-project-server | plugin/rasterizing/rasterizing/src/main/java/org/geomajas/plugin/rasterizing/sld/SymbolizerFilterVisitor.java | SymbolizerFilterVisitor.visit | @Override
public void visit(Rule rule) {
Rule copy = null;
Filter filterCopy = null;
if (rule.getFilter() != null) {
Filter filter = rule.getFilter();
filterCopy = copy(filter);
}
List<Symbolizer> symsCopy = new ArrayList<Symbolizer>();
for (Symbolizer sym : rule.symbolizers()) {
if (!skipSymbol... | java | @Override
public void visit(Rule rule) {
Rule copy = null;
Filter filterCopy = null;
if (rule.getFilter() != null) {
Filter filter = rule.getFilter();
filterCopy = copy(filter);
}
List<Symbolizer> symsCopy = new ArrayList<Symbolizer>();
for (Symbolizer sym : rule.symbolizers()) {
if (!skipSymbol... | [
"@",
"Override",
"public",
"void",
"visit",
"(",
"Rule",
"rule",
")",
"{",
"Rule",
"copy",
"=",
"null",
";",
"Filter",
"filterCopy",
"=",
"null",
";",
"if",
"(",
"rule",
".",
"getFilter",
"(",
")",
"!=",
"null",
")",
"{",
"Filter",
"filter",
"=",
"... | Overridden to skip some symbolizers. | [
"Overridden",
"to",
"skip",
"some",
"symbolizers",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/plugin/rasterizing/rasterizing/src/main/java/org/geomajas/plugin/rasterizing/sld/SymbolizerFilterVisitor.java#L77-L118 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/odmg/JTATxManager.java | JTATxManager.registerSynchronization | private void registerSynchronization(TransactionImpl odmgTrans, Transaction transaction)
{
// todo only need for development
if (odmgTrans == null || transaction == null)
{
log.error("One of the given parameters was null --> cannot do synchronization!" +
... | java | private void registerSynchronization(TransactionImpl odmgTrans, Transaction transaction)
{
// todo only need for development
if (odmgTrans == null || transaction == null)
{
log.error("One of the given parameters was null --> cannot do synchronization!" +
... | [
"private",
"void",
"registerSynchronization",
"(",
"TransactionImpl",
"odmgTrans",
",",
"Transaction",
"transaction",
")",
"{",
"// todo only need for development\r",
"if",
"(",
"odmgTrans",
"==",
"null",
"||",
"transaction",
"==",
"null",
")",
"{",
"log",
".",
"err... | Do synchronization of the given J2EE ODMG Transaction | [
"Do",
"synchronization",
"of",
"the",
"given",
"J2EE",
"ODMG",
"Transaction"
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/odmg/JTATxManager.java#L89-L131 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/odmg/JTATxManager.java | JTATxManager.getTransactionManager | private TransactionManager getTransactionManager()
{
TransactionManager retval = null;
try
{
if (log.isDebugEnabled()) log.debug("getTransactionManager called");
retval = TransactionManagerFactoryFactory.instance().getTransactionManager();
}
ca... | java | private TransactionManager getTransactionManager()
{
TransactionManager retval = null;
try
{
if (log.isDebugEnabled()) log.debug("getTransactionManager called");
retval = TransactionManagerFactoryFactory.instance().getTransactionManager();
}
ca... | [
"private",
"TransactionManager",
"getTransactionManager",
"(",
")",
"{",
"TransactionManager",
"retval",
"=",
"null",
";",
"try",
"{",
"if",
"(",
"log",
".",
"isDebugEnabled",
"(",
")",
")",
"log",
".",
"debug",
"(",
"\"getTransactionManager called\"",
")",
";",... | Return the TransactionManager of the external app | [
"Return",
"the",
"TransactionManager",
"of",
"the",
"external",
"app"
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/odmg/JTATxManager.java#L165-L179 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/odmg/JTATxManager.java | JTATxManager.abortExternalTx | public void abortExternalTx(TransactionImpl odmgTrans)
{
if (log.isDebugEnabled()) log.debug("abortExternTransaction was called");
if (odmgTrans == null) return;
TxBuffer buf = (TxBuffer) txRepository.get();
Transaction extTx = buf != null ? buf.getExternTx() : null;
tr... | java | public void abortExternalTx(TransactionImpl odmgTrans)
{
if (log.isDebugEnabled()) log.debug("abortExternTransaction was called");
if (odmgTrans == null) return;
TxBuffer buf = (TxBuffer) txRepository.get();
Transaction extTx = buf != null ? buf.getExternTx() : null;
tr... | [
"public",
"void",
"abortExternalTx",
"(",
"TransactionImpl",
"odmgTrans",
")",
"{",
"if",
"(",
"log",
".",
"isDebugEnabled",
"(",
")",
")",
"log",
".",
"debug",
"(",
"\"abortExternTransaction was called\"",
")",
";",
"if",
"(",
"odmgTrans",
"==",
"null",
")",
... | Abort an active extern transaction associated with the given PB. | [
"Abort",
"an",
"active",
"extern",
"transaction",
"associated",
"with",
"the",
"given",
"PB",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/odmg/JTATxManager.java#L220-L241 | train |
kuali/ojb-1.0.4 | src/xdoclet/java/src/xdoclet/modules/ojb/constraints/FieldDescriptorConstraints.java | FieldDescriptorConstraints.check | public void check(FieldDescriptorDef fieldDef, String checkLevel) throws ConstraintException
{
ensureColumn(fieldDef, checkLevel);
ensureJdbcType(fieldDef, checkLevel);
ensureConversion(fieldDef, checkLevel);
ensureLength(fieldDef, checkLevel);
ensurePrecisionAndScale(f... | java | public void check(FieldDescriptorDef fieldDef, String checkLevel) throws ConstraintException
{
ensureColumn(fieldDef, checkLevel);
ensureJdbcType(fieldDef, checkLevel);
ensureConversion(fieldDef, checkLevel);
ensureLength(fieldDef, checkLevel);
ensurePrecisionAndScale(f... | [
"public",
"void",
"check",
"(",
"FieldDescriptorDef",
"fieldDef",
",",
"String",
"checkLevel",
")",
"throws",
"ConstraintException",
"{",
"ensureColumn",
"(",
"fieldDef",
",",
"checkLevel",
")",
";",
"ensureJdbcType",
"(",
"fieldDef",
",",
"checkLevel",
")",
";",
... | Checks the given field descriptor.
@param fieldDef The field descriptor
@param checkLevel The amount of checks to perform
@exception ConstraintException If a constraint has been violated | [
"Checks",
"the",
"given",
"field",
"descriptor",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/xdoclet/java/src/xdoclet/modules/ojb/constraints/FieldDescriptorConstraints.java#L76-L94 | train |
kuali/ojb-1.0.4 | src/xdoclet/java/src/xdoclet/modules/ojb/constraints/FieldDescriptorConstraints.java | FieldDescriptorConstraints.ensureColumn | private void ensureColumn(FieldDescriptorDef fieldDef, String checkLevel)
{
if (!fieldDef.hasProperty(PropertyHelper.OJB_PROPERTY_COLUMN))
{
String javaname = fieldDef.getName();
if (fieldDef.isNested())
{
int pos = javaname.indexOf(":... | java | private void ensureColumn(FieldDescriptorDef fieldDef, String checkLevel)
{
if (!fieldDef.hasProperty(PropertyHelper.OJB_PROPERTY_COLUMN))
{
String javaname = fieldDef.getName();
if (fieldDef.isNested())
{
int pos = javaname.indexOf(":... | [
"private",
"void",
"ensureColumn",
"(",
"FieldDescriptorDef",
"fieldDef",
",",
"String",
"checkLevel",
")",
"{",
"if",
"(",
"!",
"fieldDef",
".",
"hasProperty",
"(",
"PropertyHelper",
".",
"OJB_PROPERTY_COLUMN",
")",
")",
"{",
"String",
"javaname",
"=",
"fieldDe... | Constraint that ensures that the field has a column property. If none is specified, then
the name of the field is used.
@param fieldDef The field descriptor
@param checkLevel The current check level (this constraint is checked in all levels) | [
"Constraint",
"that",
"ensures",
"that",
"the",
"field",
"has",
"a",
"column",
"property",
".",
"If",
"none",
"is",
"specified",
"then",
"the",
"name",
"of",
"the",
"field",
"is",
"used",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/xdoclet/java/src/xdoclet/modules/ojb/constraints/FieldDescriptorConstraints.java#L103-L139 | train |
kuali/ojb-1.0.4 | src/xdoclet/java/src/xdoclet/modules/ojb/constraints/FieldDescriptorConstraints.java | FieldDescriptorConstraints.ensureConversion | private void ensureConversion(FieldDescriptorDef fieldDef, String checkLevel) throws ConstraintException
{
if (CHECKLEVEL_NONE.equals(checkLevel))
{
return;
}
// we issue a warning if we encounter a field with a java.util.Date java type without a conversion
... | java | private void ensureConversion(FieldDescriptorDef fieldDef, String checkLevel) throws ConstraintException
{
if (CHECKLEVEL_NONE.equals(checkLevel))
{
return;
}
// we issue a warning if we encounter a field with a java.util.Date java type without a conversion
... | [
"private",
"void",
"ensureConversion",
"(",
"FieldDescriptorDef",
"fieldDef",
",",
"String",
"checkLevel",
")",
"throws",
"ConstraintException",
"{",
"if",
"(",
"CHECKLEVEL_NONE",
".",
"equals",
"(",
"checkLevel",
")",
")",
"{",
"return",
";",
"}",
"// we issue a ... | Constraint that ensures that the field has a conversion if the java type requires it. Also checks the conversion class.
@param fieldDef The field descriptor
@param checkLevel The current check level (this constraint is checked in basic (partly) and strict)
@exception ConstraintException If the conversion class is in... | [
"Constraint",
"that",
"ensures",
"that",
"the",
"field",
"has",
"a",
"conversion",
"if",
"the",
"java",
"type",
"requires",
"it",
".",
"Also",
"checks",
"the",
"conversion",
"class",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/xdoclet/java/src/xdoclet/modules/ojb/constraints/FieldDescriptorConstraints.java#L185-L232 | train |
kuali/ojb-1.0.4 | src/xdoclet/java/src/xdoclet/modules/ojb/constraints/FieldDescriptorConstraints.java | FieldDescriptorConstraints.ensureLength | private void ensureLength(FieldDescriptorDef fieldDef, String checkLevel)
{
if (!fieldDef.hasProperty(PropertyHelper.OJB_PROPERTY_LENGTH))
{
String defaultLength = JdbcTypeHelper.getDefaultLengthFor(fieldDef.getProperty(PropertyHelper.OJB_PROPERTY_JDBC_TYPE));
if (defa... | java | private void ensureLength(FieldDescriptorDef fieldDef, String checkLevel)
{
if (!fieldDef.hasProperty(PropertyHelper.OJB_PROPERTY_LENGTH))
{
String defaultLength = JdbcTypeHelper.getDefaultLengthFor(fieldDef.getProperty(PropertyHelper.OJB_PROPERTY_JDBC_TYPE));
if (defa... | [
"private",
"void",
"ensureLength",
"(",
"FieldDescriptorDef",
"fieldDef",
",",
"String",
"checkLevel",
")",
"{",
"if",
"(",
"!",
"fieldDef",
".",
"hasProperty",
"(",
"PropertyHelper",
".",
"OJB_PROPERTY_LENGTH",
")",
")",
"{",
"String",
"defaultLength",
"=",
"Jd... | Constraint that ensures that the field has a length if the jdbc type requires it.
@param fieldDef The field descriptor
@param checkLevel The current check level (this constraint is checked in all levels) | [
"Constraint",
"that",
"ensures",
"that",
"the",
"field",
"has",
"a",
"length",
"if",
"the",
"jdbc",
"type",
"requires",
"it",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/xdoclet/java/src/xdoclet/modules/ojb/constraints/FieldDescriptorConstraints.java#L240-L255 | train |
kuali/ojb-1.0.4 | src/xdoclet/java/src/xdoclet/modules/ojb/constraints/FieldDescriptorConstraints.java | FieldDescriptorConstraints.ensurePrecisionAndScale | private void ensurePrecisionAndScale(FieldDescriptorDef fieldDef, String checkLevel)
{
fieldDef.setProperty(PropertyHelper.OJB_PROPERTY_DEFAULT_PRECISION, null);
fieldDef.setProperty(PropertyHelper.OJB_PROPERTY_DEFAULT_SCALE, null);
if (!fieldDef.hasProperty(PropertyHelper.OJB_PROPERTY_P... | java | private void ensurePrecisionAndScale(FieldDescriptorDef fieldDef, String checkLevel)
{
fieldDef.setProperty(PropertyHelper.OJB_PROPERTY_DEFAULT_PRECISION, null);
fieldDef.setProperty(PropertyHelper.OJB_PROPERTY_DEFAULT_SCALE, null);
if (!fieldDef.hasProperty(PropertyHelper.OJB_PROPERTY_P... | [
"private",
"void",
"ensurePrecisionAndScale",
"(",
"FieldDescriptorDef",
"fieldDef",
",",
"String",
"checkLevel",
")",
"{",
"fieldDef",
".",
"setProperty",
"(",
"PropertyHelper",
".",
"OJB_PROPERTY_DEFAULT_PRECISION",
",",
"null",
")",
";",
"fieldDef",
".",
"setProper... | Constraint that ensures that the field has precision and scale settings if the jdbc type requires it.
@param fieldDef The field descriptor
@param checkLevel The current check level (this constraint is checked in all levels) | [
"Constraint",
"that",
"ensures",
"that",
"the",
"field",
"has",
"precision",
"and",
"scale",
"settings",
"if",
"the",
"jdbc",
"type",
"requires",
"it",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/xdoclet/java/src/xdoclet/modules/ojb/constraints/FieldDescriptorConstraints.java#L263-L301 | train |
kuali/ojb-1.0.4 | src/xdoclet/java/src/xdoclet/modules/ojb/constraints/FieldDescriptorConstraints.java | FieldDescriptorConstraints.checkLocking | private void checkLocking(FieldDescriptorDef fieldDef, String checkLevel) throws ConstraintException
{
if (CHECKLEVEL_NONE.equals(checkLevel))
{
return;
}
String jdbcType = fieldDef.getProperty(PropertyHelper.OJB_PROPERTY_JDBC_TYPE);
if (!"TIMESTAMP".eq... | java | private void checkLocking(FieldDescriptorDef fieldDef, String checkLevel) throws ConstraintException
{
if (CHECKLEVEL_NONE.equals(checkLevel))
{
return;
}
String jdbcType = fieldDef.getProperty(PropertyHelper.OJB_PROPERTY_JDBC_TYPE);
if (!"TIMESTAMP".eq... | [
"private",
"void",
"checkLocking",
"(",
"FieldDescriptorDef",
"fieldDef",
",",
"String",
"checkLevel",
")",
"throws",
"ConstraintException",
"{",
"if",
"(",
"CHECKLEVEL_NONE",
".",
"equals",
"(",
"checkLevel",
")",
")",
"{",
"return",
";",
"}",
"String",
"jdbcTy... | Checks that locking and update-lock are only used for fields of TIMESTAMP or INTEGER type.
@param fieldDef The field descriptor
@param checkLevel The current check level (this constraint is checked in basic and strict)
@exception ConstraintException If the constraint has been violated | [
"Checks",
"that",
"locking",
"and",
"update",
"-",
"lock",
"are",
"only",
"used",
"for",
"fields",
"of",
"TIMESTAMP",
"or",
"INTEGER",
"type",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/xdoclet/java/src/xdoclet/modules/ojb/constraints/FieldDescriptorConstraints.java#L310-L330 | train |
kuali/ojb-1.0.4 | src/xdoclet/java/src/xdoclet/modules/ojb/constraints/FieldDescriptorConstraints.java | FieldDescriptorConstraints.checkSequenceName | private void checkSequenceName(FieldDescriptorDef fieldDef, String checkLevel) throws ConstraintException
{
if (CHECKLEVEL_NONE.equals(checkLevel))
{
return;
}
String autoIncr = fieldDef.getProperty(PropertyHelper.OJB_PROPERTY_AUTOINCREMENT);
String seqNa... | java | private void checkSequenceName(FieldDescriptorDef fieldDef, String checkLevel) throws ConstraintException
{
if (CHECKLEVEL_NONE.equals(checkLevel))
{
return;
}
String autoIncr = fieldDef.getProperty(PropertyHelper.OJB_PROPERTY_AUTOINCREMENT);
String seqNa... | [
"private",
"void",
"checkSequenceName",
"(",
"FieldDescriptorDef",
"fieldDef",
",",
"String",
"checkLevel",
")",
"throws",
"ConstraintException",
"{",
"if",
"(",
"CHECKLEVEL_NONE",
".",
"equals",
"(",
"checkLevel",
")",
")",
"{",
"return",
";",
"}",
"String",
"a... | Checks that sequence-name is only used with autoincrement='ojb'
@param fieldDef The field descriptor
@param checkLevel The current check level (this constraint is checked in basic and strict)
@exception ConstraintException If the constraint has been violated | [
"Checks",
"that",
"sequence",
"-",
"name",
"is",
"only",
"used",
"with",
"autoincrement",
"=",
"ojb"
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/xdoclet/java/src/xdoclet/modules/ojb/constraints/FieldDescriptorConstraints.java#L339-L356 | train |
kuali/ojb-1.0.4 | src/xdoclet/java/src/xdoclet/modules/ojb/constraints/FieldDescriptorConstraints.java | FieldDescriptorConstraints.checkId | private void checkId(FieldDescriptorDef fieldDef, String checkLevel) throws ConstraintException
{
if (CHECKLEVEL_NONE.equals(checkLevel))
{
return;
}
String id = fieldDef.getProperty(PropertyHelper.OJB_PROPERTY_ID);
if ((id != null) && (id.length() > 0)... | java | private void checkId(FieldDescriptorDef fieldDef, String checkLevel) throws ConstraintException
{
if (CHECKLEVEL_NONE.equals(checkLevel))
{
return;
}
String id = fieldDef.getProperty(PropertyHelper.OJB_PROPERTY_ID);
if ((id != null) && (id.length() > 0)... | [
"private",
"void",
"checkId",
"(",
"FieldDescriptorDef",
"fieldDef",
",",
"String",
"checkLevel",
")",
"throws",
"ConstraintException",
"{",
"if",
"(",
"CHECKLEVEL_NONE",
".",
"equals",
"(",
"checkLevel",
")",
")",
"{",
"return",
";",
"}",
"String",
"id",
"=",... | Checks the id value.
@param fieldDef The field descriptor
@param checkLevel The current check level (this constraint is checked in basic and strict)
@exception ConstraintException If the constraint has been violated | [
"Checks",
"the",
"id",
"value",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/xdoclet/java/src/xdoclet/modules/ojb/constraints/FieldDescriptorConstraints.java#L365-L385 | train |
kuali/ojb-1.0.4 | src/xdoclet/java/src/xdoclet/modules/ojb/constraints/FieldDescriptorConstraints.java | FieldDescriptorConstraints.checkReadonlyAccessForNativePKs | private void checkReadonlyAccessForNativePKs(FieldDescriptorDef fieldDef, String checkLevel)
{
if (CHECKLEVEL_NONE.equals(checkLevel))
{
return;
}
String access = fieldDef.getProperty(PropertyHelper.OJB_PROPERTY_ACCESS);
String autoInc = fieldDef.getProp... | java | private void checkReadonlyAccessForNativePKs(FieldDescriptorDef fieldDef, String checkLevel)
{
if (CHECKLEVEL_NONE.equals(checkLevel))
{
return;
}
String access = fieldDef.getProperty(PropertyHelper.OJB_PROPERTY_ACCESS);
String autoInc = fieldDef.getProp... | [
"private",
"void",
"checkReadonlyAccessForNativePKs",
"(",
"FieldDescriptorDef",
"fieldDef",
",",
"String",
"checkLevel",
")",
"{",
"if",
"(",
"CHECKLEVEL_NONE",
".",
"equals",
"(",
"checkLevel",
")",
")",
"{",
"return",
";",
"}",
"String",
"access",
"=",
"field... | Checks that native primarykey fields have readonly access, and warns if not.
@param fieldDef The field descriptor
@param checkLevel The current check level (this constraint is checked in basic and strict) | [
"Checks",
"that",
"native",
"primarykey",
"fields",
"have",
"readonly",
"access",
"and",
"warns",
"if",
"not",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/xdoclet/java/src/xdoclet/modules/ojb/constraints/FieldDescriptorConstraints.java#L393-L411 | train |
kuali/ojb-1.0.4 | src/xdoclet/java/src/xdoclet/modules/ojb/constraints/FieldDescriptorConstraints.java | FieldDescriptorConstraints.checkAnonymous | private void checkAnonymous(FieldDescriptorDef fieldDef, String checkLevel) throws ConstraintException
{
if (CHECKLEVEL_NONE.equals(checkLevel))
{
return;
}
String access = fieldDef.getProperty(PropertyHelper.OJB_PROPERTY_ACCESS);
if (!"anonymous".equal... | java | private void checkAnonymous(FieldDescriptorDef fieldDef, String checkLevel) throws ConstraintException
{
if (CHECKLEVEL_NONE.equals(checkLevel))
{
return;
}
String access = fieldDef.getProperty(PropertyHelper.OJB_PROPERTY_ACCESS);
if (!"anonymous".equal... | [
"private",
"void",
"checkAnonymous",
"(",
"FieldDescriptorDef",
"fieldDef",
",",
"String",
"checkLevel",
")",
"throws",
"ConstraintException",
"{",
"if",
"(",
"CHECKLEVEL_NONE",
".",
"equals",
"(",
"checkLevel",
")",
")",
"{",
"return",
";",
"}",
"String",
"acce... | Checks anonymous fields.
@param fieldDef The field descriptor
@param checkLevel The current check level (this constraint is checked in basic and strict)
@exception ConstraintException If the constraint has been violated | [
"Checks",
"anonymous",
"fields",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/xdoclet/java/src/xdoclet/modules/ojb/constraints/FieldDescriptorConstraints.java#L420-L438 | train |
gsi-upm/BeastTool | beast-tool/src/main/java/es/upm/dit/gsi/beast/mock/jadex/common/MockAgentPlan.java | MockAgentPlan.sendRequestToDF | protected String sendRequestToDF(String df_service, Object msgContent) {
IDFComponentDescription[] receivers = getReceivers(df_service);
if (receivers.length > 0) {
IMessageEvent mevent = createMessageEvent("send_request");
mevent.getParameter(SFipa.CONTENT).setValue(msgContent)... | java | protected String sendRequestToDF(String df_service, Object msgContent) {
IDFComponentDescription[] receivers = getReceivers(df_service);
if (receivers.length > 0) {
IMessageEvent mevent = createMessageEvent("send_request");
mevent.getParameter(SFipa.CONTENT).setValue(msgContent)... | [
"protected",
"String",
"sendRequestToDF",
"(",
"String",
"df_service",
",",
"Object",
"msgContent",
")",
"{",
"IDFComponentDescription",
"[",
"]",
"receivers",
"=",
"getReceivers",
"(",
"df_service",
")",
";",
"if",
"(",
"receivers",
".",
"length",
">",
"0",
"... | Method to send Request messages to a specific df_service
@param df_service
The name of the df_service
@param msgContent
The content of the message to be sent
@return Message sent to + the name of the df_service | [
"Method",
"to",
"send",
"Request",
"messages",
"to",
"a",
"specific",
"df_service"
] | cc7fdc75cb818c5d60802aaf32c27829e0ca144c | https://github.com/gsi-upm/BeastTool/blob/cc7fdc75cb818c5d60802aaf32c27829e0ca144c/beast-tool/src/main/java/es/upm/dit/gsi/beast/mock/jadex/common/MockAgentPlan.java#L51-L67 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/otm/copy/CloneableObjectCopyStrategy.java | CloneableObjectCopyStrategy.copy | public Object copy(Object obj, PersistenceBroker broker)
throws ObjectCopyException
{
if (obj instanceof OjbCloneable)
{
try
{
return ((OjbCloneable) obj).ojbClone();
}
catch (Exception e)
{
throw new ObjectCopyException(e);
}
}
else
{
throw new ObjectCopyExcep... | java | public Object copy(Object obj, PersistenceBroker broker)
throws ObjectCopyException
{
if (obj instanceof OjbCloneable)
{
try
{
return ((OjbCloneable) obj).ojbClone();
}
catch (Exception e)
{
throw new ObjectCopyException(e);
}
}
else
{
throw new ObjectCopyExcep... | [
"public",
"Object",
"copy",
"(",
"Object",
"obj",
",",
"PersistenceBroker",
"broker",
")",
"throws",
"ObjectCopyException",
"{",
"if",
"(",
"obj",
"instanceof",
"OjbCloneable",
")",
"{",
"try",
"{",
"return",
"(",
"(",
"OjbCloneable",
")",
"obj",
")",
".",
... | If users want to implement clone on all their objects, we can use this
to make copies. This is hazardous as user may mess it up, but it is also
potentially the fastest way of making a copy.
Usually the OjbCloneable interface should just be delegating to the clone()
operation that the user has implemented.
@see org.ap... | [
"If",
"users",
"want",
"to",
"implement",
"clone",
"on",
"all",
"their",
"objects",
"we",
"can",
"use",
"this",
"to",
"make",
"copies",
".",
"This",
"is",
"hazardous",
"as",
"user",
"may",
"mess",
"it",
"up",
"but",
"it",
"is",
"also",
"potentially",
"... | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/otm/copy/CloneableObjectCopyStrategy.java#L37-L56 | train |
kuali/ojb-1.0.4 | src/xdoclet/java/src/xdoclet/modules/ojb/model/TableDef.java | TableDef.addColumn | public void addColumn(ColumnDef columnDef)
{
columnDef.setOwner(this);
_columns.put(columnDef.getName(), columnDef);
} | java | public void addColumn(ColumnDef columnDef)
{
columnDef.setOwner(this);
_columns.put(columnDef.getName(), columnDef);
} | [
"public",
"void",
"addColumn",
"(",
"ColumnDef",
"columnDef",
")",
"{",
"columnDef",
".",
"setOwner",
"(",
"this",
")",
";",
"_columns",
".",
"put",
"(",
"columnDef",
".",
"getName",
"(",
")",
",",
"columnDef",
")",
";",
"}"
] | Adds a column to this table definition.
@param columnDef The new column | [
"Adds",
"a",
"column",
"to",
"this",
"table",
"definition",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/xdoclet/java/src/xdoclet/modules/ojb/model/TableDef.java#L72-L76 | train |
kuali/ojb-1.0.4 | src/xdoclet/java/src/xdoclet/modules/ojb/model/TableDef.java | TableDef.getIndex | public IndexDef getIndex(String name)
{
String realName = (name == null ? "" : name);
IndexDef def = null;
for (Iterator it = getIndices(); it.hasNext();)
{
def = (IndexDef)it.next();
if (def.getName().equals(realName))
{
... | java | public IndexDef getIndex(String name)
{
String realName = (name == null ? "" : name);
IndexDef def = null;
for (Iterator it = getIndices(); it.hasNext();)
{
def = (IndexDef)it.next();
if (def.getName().equals(realName))
{
... | [
"public",
"IndexDef",
"getIndex",
"(",
"String",
"name",
")",
"{",
"String",
"realName",
"=",
"(",
"name",
"==",
"null",
"?",
"\"\"",
":",
"name",
")",
";",
"IndexDef",
"def",
"=",
"null",
";",
"for",
"(",
"Iterator",
"it",
"=",
"getIndices",
"(",
")... | Returns the index of the given name.
@param name The name of the index (null or empty string for the default index)
@return The index def or <code>null</code> if it does not exist | [
"Returns",
"the",
"index",
"of",
"the",
"given",
"name",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/xdoclet/java/src/xdoclet/modules/ojb/model/TableDef.java#L95-L109 | train |
kuali/ojb-1.0.4 | src/xdoclet/java/src/xdoclet/modules/ojb/model/TableDef.java | TableDef.addForeignkey | public void addForeignkey(String relationName, String remoteTable, List localColumns, List remoteColumns)
{
ForeignkeyDef foreignkeyDef = new ForeignkeyDef(relationName, remoteTable);
// the field arrays have the same length if we already checked the constraints
for (int idx = 0; idx <... | java | public void addForeignkey(String relationName, String remoteTable, List localColumns, List remoteColumns)
{
ForeignkeyDef foreignkeyDef = new ForeignkeyDef(relationName, remoteTable);
// the field arrays have the same length if we already checked the constraints
for (int idx = 0; idx <... | [
"public",
"void",
"addForeignkey",
"(",
"String",
"relationName",
",",
"String",
"remoteTable",
",",
"List",
"localColumns",
",",
"List",
"remoteColumns",
")",
"{",
"ForeignkeyDef",
"foreignkeyDef",
"=",
"new",
"ForeignkeyDef",
"(",
"relationName",
",",
"remoteTable... | Adds a foreignkey to this table.
@param relationName The name of the relation represented by the foreignkey
@param remoteTable The referenced table
@param localColumns The local columns
@param remoteColumns The remote columns | [
"Adds",
"a",
"foreignkey",
"to",
"this",
"table",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/xdoclet/java/src/xdoclet/modules/ojb/model/TableDef.java#L129-L153 | train |
kuali/ojb-1.0.4 | src/xdoclet/java/src/xdoclet/modules/ojb/model/TableDef.java | TableDef.hasForeignkey | public boolean hasForeignkey(String name)
{
String realName = (name == null ? "" : name);
ForeignkeyDef def = null;
for (Iterator it = getForeignkeys(); it.hasNext();)
{
def = (ForeignkeyDef)it.next();
if (realName.equals(def.getName()))
... | java | public boolean hasForeignkey(String name)
{
String realName = (name == null ? "" : name);
ForeignkeyDef def = null;
for (Iterator it = getForeignkeys(); it.hasNext();)
{
def = (ForeignkeyDef)it.next();
if (realName.equals(def.getName()))
... | [
"public",
"boolean",
"hasForeignkey",
"(",
"String",
"name",
")",
"{",
"String",
"realName",
"=",
"(",
"name",
"==",
"null",
"?",
"\"\"",
":",
"name",
")",
";",
"ForeignkeyDef",
"def",
"=",
"null",
";",
"for",
"(",
"Iterator",
"it",
"=",
"getForeignkeys"... | Determines whether this table has a foreignkey of the given name.
@param name The name of the foreignkey
@return <code>true</code> if there is a foreignkey of that name | [
"Determines",
"whether",
"this",
"table",
"has",
"a",
"foreignkey",
"of",
"the",
"given",
"name",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/xdoclet/java/src/xdoclet/modules/ojb/model/TableDef.java#L161-L175 | train |
kuali/ojb-1.0.4 | src/xdoclet/java/src/xdoclet/modules/ojb/model/TableDef.java | TableDef.getForeignkey | public ForeignkeyDef getForeignkey(String name, String tableName)
{
String realName = (name == null ? "" : name);
ForeignkeyDef def = null;
for (Iterator it = getForeignkeys(); it.hasNext();)
{
def = (ForeignkeyDef)it.next();
if (realName.... | java | public ForeignkeyDef getForeignkey(String name, String tableName)
{
String realName = (name == null ? "" : name);
ForeignkeyDef def = null;
for (Iterator it = getForeignkeys(); it.hasNext();)
{
def = (ForeignkeyDef)it.next();
if (realName.... | [
"public",
"ForeignkeyDef",
"getForeignkey",
"(",
"String",
"name",
",",
"String",
"tableName",
")",
"{",
"String",
"realName",
"=",
"(",
"name",
"==",
"null",
"?",
"\"\"",
":",
"name",
")",
";",
"ForeignkeyDef",
"def",
"=",
"null",
";",
"for",
"(",
"Iter... | Returns the foreignkey to the specified table.
@param name The name of the foreignkey
@param tableName The name of the referenced table
@return The foreignkey def or <code>null</code> if it does not exist | [
"Returns",
"the",
"foreignkey",
"to",
"the",
"specified",
"table",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/xdoclet/java/src/xdoclet/modules/ojb/model/TableDef.java#L184-L199 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/metadata/fieldaccess/PersistentFieldIntrospectorImpl.java | PersistentFieldIntrospectorImpl.findPropertyDescriptor | protected static PropertyDescriptor findPropertyDescriptor(Class aClass, String aPropertyName)
{
BeanInfo info;
PropertyDescriptor[] pd;
PropertyDescriptor descriptor = null;
try
{
info = Introspector.getBeanInfo(aClass);
pd = info.getPropert... | java | protected static PropertyDescriptor findPropertyDescriptor(Class aClass, String aPropertyName)
{
BeanInfo info;
PropertyDescriptor[] pd;
PropertyDescriptor descriptor = null;
try
{
info = Introspector.getBeanInfo(aClass);
pd = info.getPropert... | [
"protected",
"static",
"PropertyDescriptor",
"findPropertyDescriptor",
"(",
"Class",
"aClass",
",",
"String",
"aPropertyName",
")",
"{",
"BeanInfo",
"info",
";",
"PropertyDescriptor",
"[",
"]",
"pd",
";",
"PropertyDescriptor",
"descriptor",
"=",
"null",
";",
"try",
... | Get the PropertyDescriptor for aClass and aPropertyName | [
"Get",
"the",
"PropertyDescriptor",
"for",
"aClass",
"and",
"aPropertyName"
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/metadata/fieldaccess/PersistentFieldIntrospectorImpl.java#L202-L238 | train |
geomajas/geomajas-project-server | impl/src/main/java/org/geomajas/internal/service/FeatureExpressionServiceImpl.java | FeatureExpressionServiceImpl.getExpression | private Expression getExpression(String expressionString) throws ParseException {
if (!expressionCache.containsKey(expressionString)) {
Expression expression;
expression = parser.parseExpression(expressionString);
expressionCache.put(expressionString, expression);
}
return expressionCache.get(expressionS... | java | private Expression getExpression(String expressionString) throws ParseException {
if (!expressionCache.containsKey(expressionString)) {
Expression expression;
expression = parser.parseExpression(expressionString);
expressionCache.put(expressionString, expression);
}
return expressionCache.get(expressionS... | [
"private",
"Expression",
"getExpression",
"(",
"String",
"expressionString",
")",
"throws",
"ParseException",
"{",
"if",
"(",
"!",
"expressionCache",
".",
"containsKey",
"(",
"expressionString",
")",
")",
"{",
"Expression",
"expression",
";",
"expression",
"=",
"p... | Fetch the specified expression from the cache or create it if necessary.
@param expressionString the expression string
@return the expression
@throws ParseException oops | [
"Fetch",
"the",
"specified",
"expression",
"from",
"the",
"cache",
"or",
"create",
"it",
"if",
"necessary",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/impl/src/main/java/org/geomajas/internal/service/FeatureExpressionServiceImpl.java#L96-L104 | train |
foundation-runtime/logging | logging-log4j/src/main/java/com/cisco/oss/foundation/logging/appender/TimeBasedRollStrategy.java | TimeBasedRollStrategy.findRollStrategy | static final TimeBasedRollStrategy findRollStrategy(
final AppenderRollingProperties properties) {
if (properties.getDatePattern() == null) {
LogLog.error("null date pattern");
return ROLL_ERROR;
}
// Strip out quoted sections so that we may safely scan the undecorated
// pattern for c... | java | static final TimeBasedRollStrategy findRollStrategy(
final AppenderRollingProperties properties) {
if (properties.getDatePattern() == null) {
LogLog.error("null date pattern");
return ROLL_ERROR;
}
// Strip out quoted sections so that we may safely scan the undecorated
// pattern for c... | [
"static",
"final",
"TimeBasedRollStrategy",
"findRollStrategy",
"(",
"final",
"AppenderRollingProperties",
"properties",
")",
"{",
"if",
"(",
"properties",
".",
"getDatePattern",
"(",
")",
"==",
"null",
")",
"{",
"LogLog",
".",
"error",
"(",
"\"null date pattern\"",... | Checks each available roll strategy in turn, starting at the per-minute
strategy, next per-hour, and so on for increasing units of time until a
match is found. If no match is found, the error strategy is returned.
@param properties
@return The appropriate roll strategy. | [
"Checks",
"each",
"available",
"roll",
"strategy",
"in",
"turn",
"starting",
"at",
"the",
"per",
"-",
"minute",
"strategy",
"next",
"per",
"-",
"hour",
"and",
"so",
"on",
"for",
"increasing",
"units",
"of",
"time",
"until",
"a",
"match",
"is",
"found",
"... | cd0a07b3c5b458ecf90ab92a1e0c72a067f5cbd6 | https://github.com/foundation-runtime/logging/blob/cd0a07b3c5b458ecf90ab92a1e0c72a067f5cbd6/logging-log4j/src/main/java/com/cisco/oss/foundation/logging/appender/TimeBasedRollStrategy.java#L249-L286 | train |
kuali/ojb-1.0.4 | src/tools/org/apache/ojb/tools/mapping/reversedb2/gui/JFrmMain.java | JFrmMain.exitForm | private void exitForm(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_exitForm
Main.getProperties().setProperty(Main.PROPERTY_MAINFRAME_HEIGHT, "" + this.getHeight());
Main.getProperties().setProperty(Main.PROPERTY_MAINFRAME_WIDTH, "" + this.getWidth());
Main.getProperties().setProperty(Ma... | java | private void exitForm(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_exitForm
Main.getProperties().setProperty(Main.PROPERTY_MAINFRAME_HEIGHT, "" + this.getHeight());
Main.getProperties().setProperty(Main.PROPERTY_MAINFRAME_WIDTH, "" + this.getWidth());
Main.getProperties().setProperty(Ma... | [
"private",
"void",
"exitForm",
"(",
"java",
".",
"awt",
".",
"event",
".",
"WindowEvent",
"evt",
")",
"{",
"//GEN-FIRST:event_exitForm\r",
"Main",
".",
"getProperties",
"(",
")",
".",
"setProperty",
"(",
"Main",
".",
"PROPERTY_MAINFRAME_HEIGHT",
",",
"\"\"",
"... | Exit the Application | [
"Exit",
"the",
"Application"
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/tools/org/apache/ojb/tools/mapping/reversedb2/gui/JFrmMain.java#L146-L153 | train |
geomajas/geomajas-project-server | plugin/print/print/src/main/java/org/geomajas/plugin/printing/component/dto/PrintComponentInfo.java | PrintComponentInfo.getPrototypeName | public String getPrototypeName() {
String name = getClass().getName();
if (name.startsWith(ORG_GEOMAJAS)) {
name = name.substring(ORG_GEOMAJAS.length());
}
name = name.replace(".dto.", ".impl.");
return name.substring(0, name.length() - 4) + "Impl";
} | java | public String getPrototypeName() {
String name = getClass().getName();
if (name.startsWith(ORG_GEOMAJAS)) {
name = name.substring(ORG_GEOMAJAS.length());
}
name = name.replace(".dto.", ".impl.");
return name.substring(0, name.length() - 4) + "Impl";
} | [
"public",
"String",
"getPrototypeName",
"(",
")",
"{",
"String",
"name",
"=",
"getClass",
"(",
")",
".",
"getName",
"(",
")",
";",
"if",
"(",
"name",
".",
"startsWith",
"(",
"ORG_GEOMAJAS",
")",
")",
"{",
"name",
"=",
"name",
".",
"substring",
"(",
"... | Get prototype name.
@return prototype name | [
"Get",
"prototype",
"name",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/plugin/print/print/src/main/java/org/geomajas/plugin/printing/component/dto/PrintComponentInfo.java#L148-L155 | train |
isisaddons-legacy/isis-module-excel | dom/src/main/java/org/isisaddons/module/excel/dom/util/ExcelServiceImpl.java | ExcelServiceImpl.toExcelPivot | @Programmatic
public <T> Blob toExcelPivot(
final List<T> domainObjects,
final Class<T> cls,
final String fileName) throws ExcelService.Exception {
return toExcelPivot(domainObjects, cls, null, fileName);
} | java | @Programmatic
public <T> Blob toExcelPivot(
final List<T> domainObjects,
final Class<T> cls,
final String fileName) throws ExcelService.Exception {
return toExcelPivot(domainObjects, cls, null, fileName);
} | [
"@",
"Programmatic",
"public",
"<",
"T",
">",
"Blob",
"toExcelPivot",
"(",
"final",
"List",
"<",
"T",
">",
"domainObjects",
",",
"final",
"Class",
"<",
"T",
">",
"cls",
",",
"final",
"String",
"fileName",
")",
"throws",
"ExcelService",
".",
"Exception",
... | Creates a Blob holding a single-sheet spreadsheet with a pivot of the domain objects. The sheet name is derived from the
class name.
<p>
Minimal requirements for the domain object are:
</p>
<ul>
<li>
One property has annotation {@link PivotRow} and will be used as row identifier in left column of pivot.
Empty values a... | [
"Creates",
"a",
"Blob",
"holding",
"a",
"single",
"-",
"sheet",
"spreadsheet",
"with",
"a",
"pivot",
"of",
"the",
"domain",
"objects",
".",
"The",
"sheet",
"name",
"is",
"derived",
"from",
"the",
"class",
"name",
"."
] | a3b92b1797ab2ed609667933d4164e9fb54b9f25 | https://github.com/isisaddons-legacy/isis-module-excel/blob/a3b92b1797ab2ed609667933d4164e9fb54b9f25/dom/src/main/java/org/isisaddons/module/excel/dom/util/ExcelServiceImpl.java#L111-L117 | train |
kuali/ojb-1.0.4 | src/xdoclet/java/src/xdoclet/modules/ojb/constraints/ConstraintsBase.java | ConstraintsBase.checkProxyPrefetchingLimit | protected void checkProxyPrefetchingLimit(DefBase def, String checkLevel) throws ConstraintException
{
if (CHECKLEVEL_NONE.equals(checkLevel))
{
return;
}
if (def.hasProperty(PropertyHelper.OJB_PROPERTY_PROXY_PREFETCHING_LIMIT))
{
if (!def.hasP... | java | protected void checkProxyPrefetchingLimit(DefBase def, String checkLevel) throws ConstraintException
{
if (CHECKLEVEL_NONE.equals(checkLevel))
{
return;
}
if (def.hasProperty(PropertyHelper.OJB_PROPERTY_PROXY_PREFETCHING_LIMIT))
{
if (!def.hasP... | [
"protected",
"void",
"checkProxyPrefetchingLimit",
"(",
"DefBase",
"def",
",",
"String",
"checkLevel",
")",
"throws",
"ConstraintException",
"{",
"if",
"(",
"CHECKLEVEL_NONE",
".",
"equals",
"(",
"checkLevel",
")",
")",
"{",
"return",
";",
"}",
"if",
"(",
"def... | Constraint that ensures that the proxy-prefetching-limit has a valid value.
@param def The descriptor (class, reference, collection)
@param checkLevel The current check level (this constraint is checked in basic and strict) | [
"Constraint",
"that",
"ensures",
"that",
"the",
"proxy",
"-",
"prefetching",
"-",
"limit",
"has",
"a",
"valid",
"value",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/xdoclet/java/src/xdoclet/modules/ojb/constraints/ConstraintsBase.java#L41-L97 | train |
geomajas/geomajas-project-server | common-servlet/src/main/java/org/geomajas/servlet/CacheFilter.java | CacheFilter.shouldCache | public boolean shouldCache(String requestUri) {
String uri = requestUri.toLowerCase();
return checkContains(uri, cacheIdentifiers) || checkSuffixes(uri, cacheSuffixes);
} | java | public boolean shouldCache(String requestUri) {
String uri = requestUri.toLowerCase();
return checkContains(uri, cacheIdentifiers) || checkSuffixes(uri, cacheSuffixes);
} | [
"public",
"boolean",
"shouldCache",
"(",
"String",
"requestUri",
")",
"{",
"String",
"uri",
"=",
"requestUri",
".",
"toLowerCase",
"(",
")",
";",
"return",
"checkContains",
"(",
"uri",
",",
"cacheIdentifiers",
")",
"||",
"checkSuffixes",
"(",
"uri",
",",
"ca... | Should the URI be cached?
@param requestUri request URI
@return true when caching is needed | [
"Should",
"the",
"URI",
"be",
"cached?"
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/common-servlet/src/main/java/org/geomajas/servlet/CacheFilter.java#L211-L214 | train |
geomajas/geomajas-project-server | common-servlet/src/main/java/org/geomajas/servlet/CacheFilter.java | CacheFilter.shouldNotCache | public boolean shouldNotCache(String requestUri) {
String uri = requestUri.toLowerCase();
return checkContains(uri, noCacheIdentifiers) || checkSuffixes(uri, noCacheSuffixes);
} | java | public boolean shouldNotCache(String requestUri) {
String uri = requestUri.toLowerCase();
return checkContains(uri, noCacheIdentifiers) || checkSuffixes(uri, noCacheSuffixes);
} | [
"public",
"boolean",
"shouldNotCache",
"(",
"String",
"requestUri",
")",
"{",
"String",
"uri",
"=",
"requestUri",
".",
"toLowerCase",
"(",
")",
";",
"return",
"checkContains",
"(",
"uri",
",",
"noCacheIdentifiers",
")",
"||",
"checkSuffixes",
"(",
"uri",
",",
... | Should the URI explicitly not be cached.
@param requestUri request URI
@return true when caching is prohibited | [
"Should",
"the",
"URI",
"explicitly",
"not",
"be",
"cached",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/common-servlet/src/main/java/org/geomajas/servlet/CacheFilter.java#L222-L225 | train |
geomajas/geomajas-project-server | common-servlet/src/main/java/org/geomajas/servlet/CacheFilter.java | CacheFilter.shouldCompress | public boolean shouldCompress(String requestUri) {
String uri = requestUri.toLowerCase();
return checkSuffixes(uri, zipSuffixes);
} | java | public boolean shouldCompress(String requestUri) {
String uri = requestUri.toLowerCase();
return checkSuffixes(uri, zipSuffixes);
} | [
"public",
"boolean",
"shouldCompress",
"(",
"String",
"requestUri",
")",
"{",
"String",
"uri",
"=",
"requestUri",
".",
"toLowerCase",
"(",
")",
";",
"return",
"checkSuffixes",
"(",
"uri",
",",
"zipSuffixes",
")",
";",
"}"
] | Should this request URI be compressed?
@param requestUri request URI
@return true when should be compressed | [
"Should",
"this",
"request",
"URI",
"be",
"compressed?"
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/common-servlet/src/main/java/org/geomajas/servlet/CacheFilter.java#L233-L236 | train |
geomajas/geomajas-project-server | common-servlet/src/main/java/org/geomajas/servlet/CacheFilter.java | CacheFilter.checkContains | public boolean checkContains(String uri, String[] patterns) {
for (String pattern : patterns) {
if (pattern.length() > 0) {
if (uri.contains(pattern)) {
return true;
}
}
}
return false;
} | java | public boolean checkContains(String uri, String[] patterns) {
for (String pattern : patterns) {
if (pattern.length() > 0) {
if (uri.contains(pattern)) {
return true;
}
}
}
return false;
} | [
"public",
"boolean",
"checkContains",
"(",
"String",
"uri",
",",
"String",
"[",
"]",
"patterns",
")",
"{",
"for",
"(",
"String",
"pattern",
":",
"patterns",
")",
"{",
"if",
"(",
"pattern",
".",
"length",
"(",
")",
">",
"0",
")",
"{",
"if",
"(",
"ur... | Check whether the URL contains one of the patterns.
@param uri URI
@param patterns possible patterns
@return true when URL contains one of the patterns | [
"Check",
"whether",
"the",
"URL",
"contains",
"one",
"of",
"the",
"patterns",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/common-servlet/src/main/java/org/geomajas/servlet/CacheFilter.java#L245-L254 | train |
geomajas/geomajas-project-server | common-servlet/src/main/java/org/geomajas/servlet/CacheFilter.java | CacheFilter.checkSuffixes | public boolean checkSuffixes(String uri, String[] patterns) {
for (String pattern : patterns) {
if (pattern.length() > 0) {
if (uri.endsWith(pattern)) {
return true;
}
}
}
return false;
} | java | public boolean checkSuffixes(String uri, String[] patterns) {
for (String pattern : patterns) {
if (pattern.length() > 0) {
if (uri.endsWith(pattern)) {
return true;
}
}
}
return false;
} | [
"public",
"boolean",
"checkSuffixes",
"(",
"String",
"uri",
",",
"String",
"[",
"]",
"patterns",
")",
"{",
"for",
"(",
"String",
"pattern",
":",
"patterns",
")",
"{",
"if",
"(",
"pattern",
".",
"length",
"(",
")",
">",
"0",
")",
"{",
"if",
"(",
"ur... | Check whether the URL end with one of the given suffixes.
@param uri URI
@param patterns possible suffixes
@return true when URL ends with one of the suffixes | [
"Check",
"whether",
"the",
"URL",
"end",
"with",
"one",
"of",
"the",
"given",
"suffixes",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/common-servlet/src/main/java/org/geomajas/servlet/CacheFilter.java#L263-L272 | train |
geomajas/geomajas-project-server | common-servlet/src/main/java/org/geomajas/servlet/CacheFilter.java | CacheFilter.checkPrefixes | public boolean checkPrefixes(String uri, String[] patterns) {
for (String pattern : patterns) {
if (pattern.length() > 0) {
if (uri.startsWith(pattern)) {
return true;
}
}
}
return false;
} | java | public boolean checkPrefixes(String uri, String[] patterns) {
for (String pattern : patterns) {
if (pattern.length() > 0) {
if (uri.startsWith(pattern)) {
return true;
}
}
}
return false;
} | [
"public",
"boolean",
"checkPrefixes",
"(",
"String",
"uri",
",",
"String",
"[",
"]",
"patterns",
")",
"{",
"for",
"(",
"String",
"pattern",
":",
"patterns",
")",
"{",
"if",
"(",
"pattern",
".",
"length",
"(",
")",
">",
"0",
")",
"{",
"if",
"(",
"ur... | Check whether the URL start with one of the given prefixes.
@param uri URI
@param patterns possible prefixes
@return true when URL starts with one of the prefixes | [
"Check",
"whether",
"the",
"URL",
"start",
"with",
"one",
"of",
"the",
"given",
"prefixes",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/common-servlet/src/main/java/org/geomajas/servlet/CacheFilter.java#L281-L290 | train |
geomajas/geomajas-project-server | common-servlet/src/main/java/org/geomajas/servlet/CacheFilter.java | CacheFilter.configureNoCaching | @Api
public static void configureNoCaching(HttpServletResponse response) {
// HTTP 1.0 header:
response.setHeader(HTTP_EXPIRES_HEADER, HTTP_EXPIRES_HEADER_NOCACHE_VALUE);
response.setHeader(HTTP_CACHE_PRAGMA, HTTP_CACHE_PRAGMA_VALUE);
// HTTP 1.1 header:
response.setHeader(HTTP_CACHE_CONTROL_HEADER, HTTP_CA... | java | @Api
public static void configureNoCaching(HttpServletResponse response) {
// HTTP 1.0 header:
response.setHeader(HTTP_EXPIRES_HEADER, HTTP_EXPIRES_HEADER_NOCACHE_VALUE);
response.setHeader(HTTP_CACHE_PRAGMA, HTTP_CACHE_PRAGMA_VALUE);
// HTTP 1.1 header:
response.setHeader(HTTP_CACHE_CONTROL_HEADER, HTTP_CA... | [
"@",
"Api",
"public",
"static",
"void",
"configureNoCaching",
"(",
"HttpServletResponse",
"response",
")",
"{",
"// HTTP 1.0 header:",
"response",
".",
"setHeader",
"(",
"HTTP_EXPIRES_HEADER",
",",
"HTTP_EXPIRES_HEADER_NOCACHE_VALUE",
")",
";",
"response",
".",
"setHead... | Configure the HTTP response to switch off caching.
@param response response to configure
@since 1.9.0 | [
"Configure",
"the",
"HTTP",
"response",
"to",
"switch",
"off",
"caching",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/common-servlet/src/main/java/org/geomajas/servlet/CacheFilter.java#L302-L310 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/core/NamingLocator.java | NamingLocator.getContext | public static Context getContext()
{
if (ctx == null)
{
try
{
setContext(null);
}
catch (Exception e)
{
log.error("Cannot instantiate the InitialContext", e);
throw new OJBRuntimeEx... | java | public static Context getContext()
{
if (ctx == null)
{
try
{
setContext(null);
}
catch (Exception e)
{
log.error("Cannot instantiate the InitialContext", e);
throw new OJBRuntimeEx... | [
"public",
"static",
"Context",
"getContext",
"(",
")",
"{",
"if",
"(",
"ctx",
"==",
"null",
")",
"{",
"try",
"{",
"setContext",
"(",
"null",
")",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"log",
".",
"error",
"(",
"\"Cannot instantiate the In... | Returns the naming context. | [
"Returns",
"the",
"naming",
"context",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/core/NamingLocator.java#L43-L58 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/core/NamingLocator.java | NamingLocator.lookup | public static Object lookup(String jndiName)
{
if(log.isDebugEnabled()) log.debug("lookup("+jndiName+") was called");
try
{
return getContext().lookup(jndiName);
}
catch (NamingException e)
{
throw new OJBRuntimeException("Lookup faile... | java | public static Object lookup(String jndiName)
{
if(log.isDebugEnabled()) log.debug("lookup("+jndiName+") was called");
try
{
return getContext().lookup(jndiName);
}
catch (NamingException e)
{
throw new OJBRuntimeException("Lookup faile... | [
"public",
"static",
"Object",
"lookup",
"(",
"String",
"jndiName",
")",
"{",
"if",
"(",
"log",
".",
"isDebugEnabled",
"(",
")",
")",
"log",
".",
"debug",
"(",
"\"lookup(\"",
"+",
"jndiName",
"+",
"\") was called\"",
")",
";",
"try",
"{",
"return",
"getCo... | Lookup an object instance from JNDI context.
@param jndiName JNDI lookup name
@return Matching object or <em>null</em> if none found. | [
"Lookup",
"an",
"object",
"instance",
"from",
"JNDI",
"context",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/core/NamingLocator.java#L66-L81 | train |
geomajas/geomajas-project-server | plugin/staticsecurity/staticsecurity/src/main/java/org/geomajas/plugin/staticsecurity/security/AuthenticationTokenService.java | AuthenticationTokenService.getAuthentication | public Authentication getAuthentication(String token) {
if (null != token) {
TokenContainer container = tokens.get(token);
if (null != container) {
if (container.isValid()) {
return container.getAuthentication();
} else {
logout(token);
}
}
}
return null;
} | java | public Authentication getAuthentication(String token) {
if (null != token) {
TokenContainer container = tokens.get(token);
if (null != container) {
if (container.isValid()) {
return container.getAuthentication();
} else {
logout(token);
}
}
}
return null;
} | [
"public",
"Authentication",
"getAuthentication",
"(",
"String",
"token",
")",
"{",
"if",
"(",
"null",
"!=",
"token",
")",
"{",
"TokenContainer",
"container",
"=",
"tokens",
".",
"get",
"(",
"token",
")",
";",
"if",
"(",
"null",
"!=",
"container",
")",
"{... | Get the authentication for a specific token.
@param token token
@return authentication if any | [
"Get",
"the",
"authentication",
"for",
"a",
"specific",
"token",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/plugin/staticsecurity/staticsecurity/src/main/java/org/geomajas/plugin/staticsecurity/security/AuthenticationTokenService.java#L49-L61 | train |
geomajas/geomajas-project-server | plugin/staticsecurity/staticsecurity/src/main/java/org/geomajas/plugin/staticsecurity/security/AuthenticationTokenService.java | AuthenticationTokenService.login | public String login(Authentication authentication) {
String token = getToken();
return login(token, authentication);
} | java | public String login(Authentication authentication) {
String token = getToken();
return login(token, authentication);
} | [
"public",
"String",
"login",
"(",
"Authentication",
"authentication",
")",
"{",
"String",
"token",
"=",
"getToken",
"(",
")",
";",
"return",
"login",
"(",
"token",
",",
"authentication",
")",
";",
"}"
] | Login for a specific authentication, creating a new token.
@param authentication authentication to assign to token
@return token | [
"Login",
"for",
"a",
"specific",
"authentication",
"creating",
"a",
"new",
"token",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/plugin/staticsecurity/staticsecurity/src/main/java/org/geomajas/plugin/staticsecurity/security/AuthenticationTokenService.java#L78-L81 | train |
geomajas/geomajas-project-server | plugin/staticsecurity/staticsecurity/src/main/java/org/geomajas/plugin/staticsecurity/security/AuthenticationTokenService.java | AuthenticationTokenService.login | public String login(String token, Authentication authentication) {
if (null == token) {
return login(authentication);
}
tokens.put(token, new TokenContainer(authentication));
return token;
} | java | public String login(String token, Authentication authentication) {
if (null == token) {
return login(authentication);
}
tokens.put(token, new TokenContainer(authentication));
return token;
} | [
"public",
"String",
"login",
"(",
"String",
"token",
",",
"Authentication",
"authentication",
")",
"{",
"if",
"(",
"null",
"==",
"token",
")",
"{",
"return",
"login",
"(",
"authentication",
")",
";",
"}",
"tokens",
".",
"put",
"(",
"token",
",",
"new",
... | Login for a specific authentication, creating a specific token if given.
@param token token to use
@param authentication authentication to assign to token
@return token | [
"Login",
"for",
"a",
"specific",
"authentication",
"creating",
"a",
"specific",
"token",
"if",
"given",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/plugin/staticsecurity/staticsecurity/src/main/java/org/geomajas/plugin/staticsecurity/security/AuthenticationTokenService.java#L90-L96 | train |
kuali/ojb-1.0.4 | src/xdoclet/java/src/xdoclet/modules/ojb/model/DefBase.java | DefBase.getBooleanProperty | public boolean getBooleanProperty(String name, boolean defaultValue)
{
return PropertyHelper.toBoolean(_properties.getProperty(name), defaultValue);
} | java | public boolean getBooleanProperty(String name, boolean defaultValue)
{
return PropertyHelper.toBoolean(_properties.getProperty(name), defaultValue);
} | [
"public",
"boolean",
"getBooleanProperty",
"(",
"String",
"name",
",",
"boolean",
"defaultValue",
")",
"{",
"return",
"PropertyHelper",
".",
"toBoolean",
"(",
"_properties",
".",
"getProperty",
"(",
"name",
")",
",",
"defaultValue",
")",
";",
"}"
] | Returns the boolean value of the specified property.
@param name The name of the property
@param defaultValue The value to use if the property is not set or not a boolean
@return The value | [
"Returns",
"the",
"boolean",
"value",
"of",
"the",
"specified",
"property",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/xdoclet/java/src/xdoclet/modules/ojb/model/DefBase.java#L112-L115 | train |
geomajas/geomajas-project-server | plugin/layer-geotools/geotools/src/main/java/org/geomajas/layer/shapeinmem/FeatureSourceRetriever.java | FeatureSourceRetriever.getFeatureSource | public SimpleFeatureSource getFeatureSource() throws LayerException {
try {
if (dataStore instanceof WFSDataStore) {
return dataStore.getFeatureSource(featureSourceName.replace(":", "_"));
} else {
return dataStore.getFeatureSource(featureSourceName);
}
} catch (IOException e) {
throw new LayerE... | java | public SimpleFeatureSource getFeatureSource() throws LayerException {
try {
if (dataStore instanceof WFSDataStore) {
return dataStore.getFeatureSource(featureSourceName.replace(":", "_"));
} else {
return dataStore.getFeatureSource(featureSourceName);
}
} catch (IOException e) {
throw new LayerE... | [
"public",
"SimpleFeatureSource",
"getFeatureSource",
"(",
")",
"throws",
"LayerException",
"{",
"try",
"{",
"if",
"(",
"dataStore",
"instanceof",
"WFSDataStore",
")",
"{",
"return",
"dataStore",
".",
"getFeatureSource",
"(",
"featureSourceName",
".",
"replace",
"(",... | Retrieve the FeatureSource object from the data store.
@return An OpenGIS FeatureSource object;
@throws LayerException
oops | [
"Retrieve",
"the",
"FeatureSource",
"object",
"from",
"the",
"data",
"store",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/plugin/layer-geotools/geotools/src/main/java/org/geomajas/layer/shapeinmem/FeatureSourceRetriever.java#L98-L112 | train |
geomajas/geomajas-project-server | plugin/layer-geotools/geotools/src/main/java/org/geomajas/layer/shapeinmem/FeatureSourceRetriever.java | FeatureSourceRetriever.setAttributes | public void setAttributes(Object feature, Map<String, Attribute> attributes) throws LayerException {
for (Map.Entry<String, Attribute> entry : attributes.entrySet()) {
String name = entry.getKey();
if (!name.equals(getGeometryAttributeName())) {
asFeature(feature).setAttribute(name, entry.getValue());
}
... | java | public void setAttributes(Object feature, Map<String, Attribute> attributes) throws LayerException {
for (Map.Entry<String, Attribute> entry : attributes.entrySet()) {
String name = entry.getKey();
if (!name.equals(getGeometryAttributeName())) {
asFeature(feature).setAttribute(name, entry.getValue());
}
... | [
"public",
"void",
"setAttributes",
"(",
"Object",
"feature",
",",
"Map",
"<",
"String",
",",
"Attribute",
">",
"attributes",
")",
"throws",
"LayerException",
"{",
"for",
"(",
"Map",
".",
"Entry",
"<",
"String",
",",
"Attribute",
">",
"entry",
":",
"attribu... | Set the attributes of a feature.
@param feature the feature
@param attributes the attributes
@throws LayerException oops | [
"Set",
"the",
"attributes",
"of",
"a",
"feature",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/plugin/layer-geotools/geotools/src/main/java/org/geomajas/layer/shapeinmem/FeatureSourceRetriever.java#L155-L162 | train |
geomajas/geomajas-project-server | plugin/layer-hibernate/hibernate/src/main/java/org/geomajas/layer/hibernate/HibernateFeatureModel.java | HibernateFeatureModel.getAttributeRecursively | private Object getAttributeRecursively(Object feature, String name) throws LayerException {
if (feature == null) {
return null;
}
// Split up properties: the first and the rest.
String[] properties = name.split(SEPARATOR_REGEXP, 2);
Object tempFeature;
// If the first property is the identifier:
if (... | java | private Object getAttributeRecursively(Object feature, String name) throws LayerException {
if (feature == null) {
return null;
}
// Split up properties: the first and the rest.
String[] properties = name.split(SEPARATOR_REGEXP, 2);
Object tempFeature;
// If the first property is the identifier:
if (... | [
"private",
"Object",
"getAttributeRecursively",
"(",
"Object",
"feature",
",",
"String",
"name",
")",
"throws",
"LayerException",
"{",
"if",
"(",
"feature",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"// Split up properties: the first and the rest.",
"Strin... | A recursive getAttribute method. In case a one-to-many is passed, an array will be returned.
@param feature The feature wherein to search for the attribute
@param name The attribute's full name. (can be attr1.attr2)
@return Returns the value. In case a one-to-many is passed along the way, an array will be returned.
@t... | [
"A",
"recursive",
"getAttribute",
"method",
".",
"In",
"case",
"a",
"one",
"-",
"to",
"-",
"many",
"is",
"passed",
"an",
"array",
"will",
"be",
"returned",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/plugin/layer-hibernate/hibernate/src/main/java/org/geomajas/layer/hibernate/HibernateFeatureModel.java#L188-L226 | train |
Axway/Grapes | server/src/main/java/org/axway/grapes/server/core/options/FiltersHolder.java | FiltersHolder.shouldBeInReport | public boolean shouldBeInReport(final DbDependency dependency) {
if(dependency == null){
return false;
}
if(dependency.getTarget() == null){
return false;
}
if(corporateFilter != null){
if(!decorator.getShowThirdparty() && !corporateFilter.filt... | java | public boolean shouldBeInReport(final DbDependency dependency) {
if(dependency == null){
return false;
}
if(dependency.getTarget() == null){
return false;
}
if(corporateFilter != null){
if(!decorator.getShowThirdparty() && !corporateFilter.filt... | [
"public",
"boolean",
"shouldBeInReport",
"(",
"final",
"DbDependency",
"dependency",
")",
"{",
"if",
"(",
"dependency",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"dependency",
".",
"getTarget",
"(",
")",
"==",
"null",
")",
"{",
"ret... | Check if a dependency matches the filters
@param dependency
@return boolean | [
"Check",
"if",
"a",
"dependency",
"matches",
"the",
"filters"
] | ce9cc73d85f83eaa5fbc991abb593915a8c8374e | https://github.com/Axway/Grapes/blob/ce9cc73d85f83eaa5fbc991abb593915a8c8374e/server/src/main/java/org/axway/grapes/server/core/options/FiltersHolder.java#L179-L200 | train |
Axway/Grapes | server/src/main/java/org/axway/grapes/server/core/options/FiltersHolder.java | FiltersHolder.getArtifactFieldsFilters | public Map<String, Object> getArtifactFieldsFilters() {
final Map<String, Object> params = new HashMap<String, Object>();
for(final Filter filter: filters){
params.putAll(filter.artifactFilterFields());
}
return params;
} | java | public Map<String, Object> getArtifactFieldsFilters() {
final Map<String, Object> params = new HashMap<String, Object>();
for(final Filter filter: filters){
params.putAll(filter.artifactFilterFields());
}
return params;
} | [
"public",
"Map",
"<",
"String",
",",
"Object",
">",
"getArtifactFieldsFilters",
"(",
")",
"{",
"final",
"Map",
"<",
"String",
",",
"Object",
">",
"params",
"=",
"new",
"HashMap",
"<",
"String",
",",
"Object",
">",
"(",
")",
";",
"for",
"(",
"final",
... | Generates a Map of query parameters for Artifact regarding the filters
@return Map<String, Object> | [
"Generates",
"a",
"Map",
"of",
"query",
"parameters",
"for",
"Artifact",
"regarding",
"the",
"filters"
] | ce9cc73d85f83eaa5fbc991abb593915a8c8374e | https://github.com/Axway/Grapes/blob/ce9cc73d85f83eaa5fbc991abb593915a8c8374e/server/src/main/java/org/axway/grapes/server/core/options/FiltersHolder.java#L207-L215 | train |
Axway/Grapes | server/src/main/java/org/axway/grapes/server/core/options/FiltersHolder.java | FiltersHolder.getModuleFieldsFilters | public Map<String, Object> getModuleFieldsFilters() {
final Map<String, Object> params = new HashMap<String, Object>();
for(final Filter filter: filters){
params.putAll(filter.moduleFilterFields());
}
return params;
} | java | public Map<String, Object> getModuleFieldsFilters() {
final Map<String, Object> params = new HashMap<String, Object>();
for(final Filter filter: filters){
params.putAll(filter.moduleFilterFields());
}
return params;
} | [
"public",
"Map",
"<",
"String",
",",
"Object",
">",
"getModuleFieldsFilters",
"(",
")",
"{",
"final",
"Map",
"<",
"String",
",",
"Object",
">",
"params",
"=",
"new",
"HashMap",
"<",
"String",
",",
"Object",
">",
"(",
")",
";",
"for",
"(",
"final",
"F... | Generates a Map of query parameters for Module regarding the filters
@return Map<String, Object> | [
"Generates",
"a",
"Map",
"of",
"query",
"parameters",
"for",
"Module",
"regarding",
"the",
"filters"
] | ce9cc73d85f83eaa5fbc991abb593915a8c8374e | https://github.com/Axway/Grapes/blob/ce9cc73d85f83eaa5fbc991abb593915a8c8374e/server/src/main/java/org/axway/grapes/server/core/options/FiltersHolder.java#L222-L230 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/util/dbhandling/DBHandlingTask.java | DBHandlingTask.createDBHandling | private DBHandling createDBHandling() throws BuildException
{
if ((_handling == null) || (_handling.length() == 0))
{
throw new BuildException("No handling specified");
}
try
{
String className = "org.apache.ojb.broker.platforms."+
... | java | private DBHandling createDBHandling() throws BuildException
{
if ((_handling == null) || (_handling.length() == 0))
{
throw new BuildException("No handling specified");
}
try
{
String className = "org.apache.ojb.broker.platforms."+
... | [
"private",
"DBHandling",
"createDBHandling",
"(",
")",
"throws",
"BuildException",
"{",
"if",
"(",
"(",
"_handling",
"==",
"null",
")",
"||",
"(",
"_handling",
".",
"length",
"(",
")",
"==",
"0",
")",
")",
"{",
"throw",
"new",
"BuildException",
"(",
"\"N... | Creates a db handling object.
@return The db handling object
@throws BuildException If the handling is invalid | [
"Creates",
"a",
"db",
"handling",
"object",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/util/dbhandling/DBHandlingTask.java#L244-L263 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/util/dbhandling/DBHandlingTask.java | DBHandlingTask.addIncludes | private void addIncludes(DBHandling handling, FileSet fileSet) throws BuildException
{
DirectoryScanner scanner = fileSet.getDirectoryScanner(getProject());
String[] files = scanner.getIncludedFiles();
StringBuffer includes = new StringBuffer();
for (int idx = ... | java | private void addIncludes(DBHandling handling, FileSet fileSet) throws BuildException
{
DirectoryScanner scanner = fileSet.getDirectoryScanner(getProject());
String[] files = scanner.getIncludedFiles();
StringBuffer includes = new StringBuffer();
for (int idx = ... | [
"private",
"void",
"addIncludes",
"(",
"DBHandling",
"handling",
",",
"FileSet",
"fileSet",
")",
"throws",
"BuildException",
"{",
"DirectoryScanner",
"scanner",
"=",
"fileSet",
".",
"getDirectoryScanner",
"(",
"getProject",
"(",
")",
")",
";",
"String",
"[",
"]"... | Adds the includes of the fileset to the handling.
@param handling The handling
@param fileSet The fileset | [
"Adds",
"the",
"includes",
"of",
"the",
"fileset",
"to",
"the",
"handling",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/util/dbhandling/DBHandlingTask.java#L271-L293 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/ant/DdlUtilsDataHandling.java | DdlUtilsDataHandling.setModel | public void setModel(Database databaseModel, DescriptorRepository objModel)
{
_dbModel = databaseModel;
_preparedModel = new PreparedModel(objModel, databaseModel);
} | java | public void setModel(Database databaseModel, DescriptorRepository objModel)
{
_dbModel = databaseModel;
_preparedModel = new PreparedModel(objModel, databaseModel);
} | [
"public",
"void",
"setModel",
"(",
"Database",
"databaseModel",
",",
"DescriptorRepository",
"objModel",
")",
"{",
"_dbModel",
"=",
"databaseModel",
";",
"_preparedModel",
"=",
"new",
"PreparedModel",
"(",
"objModel",
",",
"databaseModel",
")",
";",
"}"
] | Sets the model that the handling works on.
@param databaseModel The database model
@param objModel The object model | [
"Sets",
"the",
"model",
"that",
"the",
"handling",
"works",
"on",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/ant/DdlUtilsDataHandling.java#L134-L138 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/ant/DdlUtilsDataHandling.java | DdlUtilsDataHandling.getDataDTD | public void getDataDTD(Writer output) throws DataTaskException
{
try
{
output.write("<!ELEMENT dataset (\n");
for (Iterator it = _preparedModel.getElementNames(); it.hasNext();)
{
String elementName = (String)it.next();
ou... | java | public void getDataDTD(Writer output) throws DataTaskException
{
try
{
output.write("<!ELEMENT dataset (\n");
for (Iterator it = _preparedModel.getElementNames(); it.hasNext();)
{
String elementName = (String)it.next();
ou... | [
"public",
"void",
"getDataDTD",
"(",
"Writer",
"output",
")",
"throws",
"DataTaskException",
"{",
"try",
"{",
"output",
".",
"write",
"(",
"\"<!ELEMENT dataset (\\n\"",
")",
";",
"for",
"(",
"Iterator",
"it",
"=",
"_preparedModel",
".",
"getElementNames",
"(",
... | Writes a DTD that can be used for data XML files matching the current model to the given writer.
@param output The writer to write the DTD to | [
"Writes",
"a",
"DTD",
"that",
"can",
"be",
"used",
"for",
"data",
"XML",
"files",
"matching",
"the",
"current",
"model",
"to",
"the",
"given",
"writer",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/ant/DdlUtilsDataHandling.java#L155-L216 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/util/ConstructorHelper.java | ConstructorHelper.instantiate | public static Object instantiate(Class clazz) throws InstantiationException
{
Object result = null;
try
{
result = ClassHelper.newInstance(clazz);
}
catch(IllegalAccessException e)
{
try
{
result = ClassHe... | java | public static Object instantiate(Class clazz) throws InstantiationException
{
Object result = null;
try
{
result = ClassHelper.newInstance(clazz);
}
catch(IllegalAccessException e)
{
try
{
result = ClassHe... | [
"public",
"static",
"Object",
"instantiate",
"(",
"Class",
"clazz",
")",
"throws",
"InstantiationException",
"{",
"Object",
"result",
"=",
"null",
";",
"try",
"{",
"result",
"=",
"ClassHelper",
".",
"newInstance",
"(",
"clazz",
")",
";",
"}",
"catch",
"(",
... | create a new instance of class clazz.
first use the public default constructor.
If this fails also try to use protected an private constructors.
@param clazz the class to instantiate
@return the fresh instance of class clazz
@throws InstantiationException | [
"create",
"a",
"new",
"instance",
"of",
"class",
"clazz",
".",
"first",
"use",
"the",
"public",
"default",
"constructor",
".",
"If",
"this",
"fails",
"also",
"try",
"to",
"use",
"protected",
"an",
"private",
"constructors",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/util/ConstructorHelper.java#L54-L75 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/util/ConstructorHelper.java | ConstructorHelper.instantiate | public static Object instantiate(Constructor constructor) throws InstantiationException
{
if(constructor == null)
{
throw new ClassNotPersistenceCapableException(
"A zero argument constructor was not provided!");
}
Object result = null;
... | java | public static Object instantiate(Constructor constructor) throws InstantiationException
{
if(constructor == null)
{
throw new ClassNotPersistenceCapableException(
"A zero argument constructor was not provided!");
}
Object result = null;
... | [
"public",
"static",
"Object",
"instantiate",
"(",
"Constructor",
"constructor",
")",
"throws",
"InstantiationException",
"{",
"if",
"(",
"constructor",
"==",
"null",
")",
"{",
"throw",
"new",
"ClassNotPersistenceCapableException",
"(",
"\"A zero argument constructor was n... | create a new instance of the class represented by the no-argument constructor provided
@param constructor the zero argument constructor for the class
@return a new instance of the class
@throws InstantiationException
@throws ClassNotPersistenceCapableException if the constructor is null or there is an
exception while t... | [
"create",
"a",
"new",
"instance",
"of",
"the",
"class",
"represented",
"by",
"the",
"no",
"-",
"argument",
"constructor",
"provided"
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/util/ConstructorHelper.java#L85-L109 | train |
geomajas/geomajas-project-server | plugin/layer-geotools/geotools/src/main/java/org/geomajas/layer/geotools/GeoToolsTransactionSynchronization.java | GeoToolsTransactionSynchronization.synchTransaction | public void synchTransaction(SimpleFeatureStore featureStore) {
// check if transaction is active, otherwise do nothing (auto-commit mode)
if (TransactionSynchronizationManager.isActualTransactionActive()) {
DataAccess<SimpleFeatureType, SimpleFeature> dataStore = featureStore.getDataStore();
if (!transaction... | java | public void synchTransaction(SimpleFeatureStore featureStore) {
// check if transaction is active, otherwise do nothing (auto-commit mode)
if (TransactionSynchronizationManager.isActualTransactionActive()) {
DataAccess<SimpleFeatureType, SimpleFeature> dataStore = featureStore.getDataStore();
if (!transaction... | [
"public",
"void",
"synchTransaction",
"(",
"SimpleFeatureStore",
"featureStore",
")",
"{",
"// check if transaction is active, otherwise do nothing (auto-commit mode)",
"if",
"(",
"TransactionSynchronizationManager",
".",
"isActualTransactionActive",
"(",
")",
")",
"{",
"DataAcce... | Synchronize the geotools transaction with the platform transaction, if such a transaction is active.
@param featureStore
@param dataSource | [
"Synchronize",
"the",
"geotools",
"transaction",
"with",
"the",
"platform",
"transaction",
"if",
"such",
"a",
"transaction",
"is",
"active",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/plugin/layer-geotools/geotools/src/main/java/org/geomajas/layer/geotools/GeoToolsTransactionSynchronization.java#L105-L122 | train |
geomajas/geomajas-project-server | command/src/main/java/org/geomajas/command/general/CopyrightCommand.java | CopyrightCommand.buildCopyrightMap | @PostConstruct
protected void buildCopyrightMap() {
if (null == declaredPlugins) {
return;
}
// go over all plug-ins, adding copyright info, avoiding duplicates (on object key)
for (PluginInfo plugin : declaredPlugins.values()) {
for (CopyrightInfo copyright : plugin.getCopyrightInfo()) {
String key ... | java | @PostConstruct
protected void buildCopyrightMap() {
if (null == declaredPlugins) {
return;
}
// go over all plug-ins, adding copyright info, avoiding duplicates (on object key)
for (PluginInfo plugin : declaredPlugins.values()) {
for (CopyrightInfo copyright : plugin.getCopyrightInfo()) {
String key ... | [
"@",
"PostConstruct",
"protected",
"void",
"buildCopyrightMap",
"(",
")",
"{",
"if",
"(",
"null",
"==",
"declaredPlugins",
")",
"{",
"return",
";",
"}",
"// go over all plug-ins, adding copyright info, avoiding duplicates (on object key)",
"for",
"(",
"PluginInfo",
"plugi... | Build copyright map once. | [
"Build",
"copyright",
"map",
"once",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/command/src/main/java/org/geomajas/command/general/CopyrightCommand.java#L52-L72 | train |
Axway/Grapes | server/src/main/java/org/axway/grapes/server/core/ArtifactHandler.java | ArtifactHandler.storeIfNew | public void storeIfNew(final DbArtifact fromClient) {
final DbArtifact existing = repositoryHandler.getArtifact(fromClient.getGavc());
if(existing != null){
existing.setLicenses(fromClient.getLicenses());
store(existing);
}
if(existing == null){
store(f... | java | public void storeIfNew(final DbArtifact fromClient) {
final DbArtifact existing = repositoryHandler.getArtifact(fromClient.getGavc());
if(existing != null){
existing.setLicenses(fromClient.getLicenses());
store(existing);
}
if(existing == null){
store(f... | [
"public",
"void",
"storeIfNew",
"(",
"final",
"DbArtifact",
"fromClient",
")",
"{",
"final",
"DbArtifact",
"existing",
"=",
"repositoryHandler",
".",
"getArtifact",
"(",
"fromClient",
".",
"getGavc",
"(",
")",
")",
";",
"if",
"(",
"existing",
"!=",
"null",
"... | If the Artifact does not exist, it will add it to the database. Nothing if it already exit.
@param fromClient DbArtifact | [
"If",
"the",
"Artifact",
"does",
"not",
"exist",
"it",
"will",
"add",
"it",
"to",
"the",
"database",
".",
"Nothing",
"if",
"it",
"already",
"exit",
"."
] | ce9cc73d85f83eaa5fbc991abb593915a8c8374e | https://github.com/Axway/Grapes/blob/ce9cc73d85f83eaa5fbc991abb593915a8c8374e/server/src/main/java/org/axway/grapes/server/core/ArtifactHandler.java#L55-L66 | train |
Axway/Grapes | server/src/main/java/org/axway/grapes/server/core/ArtifactHandler.java | ArtifactHandler.addLicense | public void addLicense(final String gavc, final String licenseId) {
final DbArtifact dbArtifact = getArtifact(gavc);
// Try to find an existing license that match the new one
final LicenseHandler licenseHandler = new LicenseHandler(repositoryHandler);
final DbLicense license = licenseHa... | java | public void addLicense(final String gavc, final String licenseId) {
final DbArtifact dbArtifact = getArtifact(gavc);
// Try to find an existing license that match the new one
final LicenseHandler licenseHandler = new LicenseHandler(repositoryHandler);
final DbLicense license = licenseHa... | [
"public",
"void",
"addLicense",
"(",
"final",
"String",
"gavc",
",",
"final",
"String",
"licenseId",
")",
"{",
"final",
"DbArtifact",
"dbArtifact",
"=",
"getArtifact",
"(",
"gavc",
")",
";",
"// Try to find an existing license that match the new one",
"final",
"Licens... | Adds a license to an artifact if the license exist into the database
@param gavc String
@param licenseId String | [
"Adds",
"a",
"license",
"to",
"an",
"artifact",
"if",
"the",
"license",
"exist",
"into",
"the",
"database"
] | ce9cc73d85f83eaa5fbc991abb593915a8c8374e | https://github.com/Axway/Grapes/blob/ce9cc73d85f83eaa5fbc991abb593915a8c8374e/server/src/main/java/org/axway/grapes/server/core/ArtifactHandler.java#L74-L94 | train |
Axway/Grapes | server/src/main/java/org/axway/grapes/server/core/ArtifactHandler.java | ArtifactHandler.getArtifactVersions | public List<String> getArtifactVersions(final String gavc) {
final DbArtifact artifact = getArtifact(gavc);
return repositoryHandler.getArtifactVersions(artifact);
} | java | public List<String> getArtifactVersions(final String gavc) {
final DbArtifact artifact = getArtifact(gavc);
return repositoryHandler.getArtifactVersions(artifact);
} | [
"public",
"List",
"<",
"String",
">",
"getArtifactVersions",
"(",
"final",
"String",
"gavc",
")",
"{",
"final",
"DbArtifact",
"artifact",
"=",
"getArtifact",
"(",
"gavc",
")",
";",
"return",
"repositoryHandler",
".",
"getArtifactVersions",
"(",
"artifact",
")",
... | Returns a the list of available version of an artifact
@param gavc String
@return List<String> | [
"Returns",
"a",
"the",
"list",
"of",
"available",
"version",
"of",
"an",
"artifact"
] | ce9cc73d85f83eaa5fbc991abb593915a8c8374e | https://github.com/Axway/Grapes/blob/ce9cc73d85f83eaa5fbc991abb593915a8c8374e/server/src/main/java/org/axway/grapes/server/core/ArtifactHandler.java#L122-L125 | train |
Axway/Grapes | server/src/main/java/org/axway/grapes/server/core/ArtifactHandler.java | ArtifactHandler.getArtifactLastVersion | public String getArtifactLastVersion(final String gavc) {
final List<String> versions = getArtifactVersions(gavc);
final VersionsHandler versionHandler = new VersionsHandler(repositoryHandler);
final String viaCompare = versionHandler.getLastVersion(versions);
if (viaCompare != null) {... | java | public String getArtifactLastVersion(final String gavc) {
final List<String> versions = getArtifactVersions(gavc);
final VersionsHandler versionHandler = new VersionsHandler(repositoryHandler);
final String viaCompare = versionHandler.getLastVersion(versions);
if (viaCompare != null) {... | [
"public",
"String",
"getArtifactLastVersion",
"(",
"final",
"String",
"gavc",
")",
"{",
"final",
"List",
"<",
"String",
">",
"versions",
"=",
"getArtifactVersions",
"(",
"gavc",
")",
";",
"final",
"VersionsHandler",
"versionHandler",
"=",
"new",
"VersionsHandler",... | Returns the last available version of an artifact
@param gavc String
@return String | [
"Returns",
"the",
"last",
"available",
"version",
"of",
"an",
"artifact"
] | ce9cc73d85f83eaa5fbc991abb593915a8c8374e | https://github.com/Axway/Grapes/blob/ce9cc73d85f83eaa5fbc991abb593915a8c8374e/server/src/main/java/org/axway/grapes/server/core/ArtifactHandler.java#L133-L151 | train |
Axway/Grapes | server/src/main/java/org/axway/grapes/server/core/ArtifactHandler.java | ArtifactHandler.getArtifact | public DbArtifact getArtifact(final String gavc) {
final DbArtifact artifact = repositoryHandler.getArtifact(gavc);
if(artifact == null){
throw new WebApplicationException(Response.status(Response.Status.NOT_FOUND)
.entity("Artifact " + gavc + " does not exist.").build()... | java | public DbArtifact getArtifact(final String gavc) {
final DbArtifact artifact = repositoryHandler.getArtifact(gavc);
if(artifact == null){
throw new WebApplicationException(Response.status(Response.Status.NOT_FOUND)
.entity("Artifact " + gavc + " does not exist.").build()... | [
"public",
"DbArtifact",
"getArtifact",
"(",
"final",
"String",
"gavc",
")",
"{",
"final",
"DbArtifact",
"artifact",
"=",
"repositoryHandler",
".",
"getArtifact",
"(",
"gavc",
")",
";",
"if",
"(",
"artifact",
"==",
"null",
")",
"{",
"throw",
"new",
"WebApplic... | Return an artifact regarding its gavc
@param gavc String
@return DbArtifact | [
"Return",
"an",
"artifact",
"regarding",
"its",
"gavc"
] | ce9cc73d85f83eaa5fbc991abb593915a8c8374e | https://github.com/Axway/Grapes/blob/ce9cc73d85f83eaa5fbc991abb593915a8c8374e/server/src/main/java/org/axway/grapes/server/core/ArtifactHandler.java#L159-L168 | train |
Axway/Grapes | server/src/main/java/org/axway/grapes/server/core/ArtifactHandler.java | ArtifactHandler.getOrganization | public DbOrganization getOrganization(final DbArtifact dbArtifact) {
final DbModule module = getModule(dbArtifact);
if(module == null || module.getOrganization() == null){
return null;
}
return repositoryHandler.getOrganization(module.getOrganization());
} | java | public DbOrganization getOrganization(final DbArtifact dbArtifact) {
final DbModule module = getModule(dbArtifact);
if(module == null || module.getOrganization() == null){
return null;
}
return repositoryHandler.getOrganization(module.getOrganization());
} | [
"public",
"DbOrganization",
"getOrganization",
"(",
"final",
"DbArtifact",
"dbArtifact",
")",
"{",
"final",
"DbModule",
"module",
"=",
"getModule",
"(",
"dbArtifact",
")",
";",
"if",
"(",
"module",
"==",
"null",
"||",
"module",
".",
"getOrganization",
"(",
")"... | Returns the Organization that produce this artifact or null if there is none
@param dbArtifact DbArtifact
@return DbOrganization | [
"Returns",
"the",
"Organization",
"that",
"produce",
"this",
"artifact",
"or",
"null",
"if",
"there",
"is",
"none"
] | ce9cc73d85f83eaa5fbc991abb593915a8c8374e | https://github.com/Axway/Grapes/blob/ce9cc73d85f83eaa5fbc991abb593915a8c8374e/server/src/main/java/org/axway/grapes/server/core/ArtifactHandler.java#L196-L204 | train |
Axway/Grapes | server/src/main/java/org/axway/grapes/server/core/ArtifactHandler.java | ArtifactHandler.updateDownLoadUrl | public void updateDownLoadUrl(final String gavc, final String downLoadUrl) {
final DbArtifact artifact = getArtifact(gavc);
repositoryHandler.updateDownloadUrl(artifact, downLoadUrl);
} | java | public void updateDownLoadUrl(final String gavc, final String downLoadUrl) {
final DbArtifact artifact = getArtifact(gavc);
repositoryHandler.updateDownloadUrl(artifact, downLoadUrl);
} | [
"public",
"void",
"updateDownLoadUrl",
"(",
"final",
"String",
"gavc",
",",
"final",
"String",
"downLoadUrl",
")",
"{",
"final",
"DbArtifact",
"artifact",
"=",
"getArtifact",
"(",
"gavc",
")",
";",
"repositoryHandler",
".",
"updateDownloadUrl",
"(",
"artifact",
... | Update artifact download url of an artifact
@param gavc String
@param downLoadUrl String | [
"Update",
"artifact",
"download",
"url",
"of",
"an",
"artifact"
] | ce9cc73d85f83eaa5fbc991abb593915a8c8374e | https://github.com/Axway/Grapes/blob/ce9cc73d85f83eaa5fbc991abb593915a8c8374e/server/src/main/java/org/axway/grapes/server/core/ArtifactHandler.java#L212-L215 | train |
Axway/Grapes | server/src/main/java/org/axway/grapes/server/core/ArtifactHandler.java | ArtifactHandler.updateProvider | public void updateProvider(final String gavc, final String provider) {
final DbArtifact artifact = getArtifact(gavc);
repositoryHandler.updateProvider(artifact, provider);
} | java | public void updateProvider(final String gavc, final String provider) {
final DbArtifact artifact = getArtifact(gavc);
repositoryHandler.updateProvider(artifact, provider);
} | [
"public",
"void",
"updateProvider",
"(",
"final",
"String",
"gavc",
",",
"final",
"String",
"provider",
")",
"{",
"final",
"DbArtifact",
"artifact",
"=",
"getArtifact",
"(",
"gavc",
")",
";",
"repositoryHandler",
".",
"updateProvider",
"(",
"artifact",
",",
"p... | Update artifact provider
@param gavc String
@param provider String | [
"Update",
"artifact",
"provider"
] | ce9cc73d85f83eaa5fbc991abb593915a8c8374e | https://github.com/Axway/Grapes/blob/ce9cc73d85f83eaa5fbc991abb593915a8c8374e/server/src/main/java/org/axway/grapes/server/core/ArtifactHandler.java#L223-L226 | train |
Axway/Grapes | server/src/main/java/org/axway/grapes/server/core/ArtifactHandler.java | ArtifactHandler.getAncestors | public List<DbModule> getAncestors(final String gavc, final FiltersHolder filters) {
final DbArtifact dbArtifact = getArtifact(gavc);
return repositoryHandler.getAncestors(dbArtifact, filters);
} | java | public List<DbModule> getAncestors(final String gavc, final FiltersHolder filters) {
final DbArtifact dbArtifact = getArtifact(gavc);
return repositoryHandler.getAncestors(dbArtifact, filters);
} | [
"public",
"List",
"<",
"DbModule",
">",
"getAncestors",
"(",
"final",
"String",
"gavc",
",",
"final",
"FiltersHolder",
"filters",
")",
"{",
"final",
"DbArtifact",
"dbArtifact",
"=",
"getArtifact",
"(",
"gavc",
")",
";",
"return",
"repositoryHandler",
".",
"get... | Return the list of module that uses the targeted artifact
@param gavc String
@param filters FiltersHolder
@return List<DbModule> | [
"Return",
"the",
"list",
"of",
"module",
"that",
"uses",
"the",
"targeted",
"artifact"
] | ce9cc73d85f83eaa5fbc991abb593915a8c8374e | https://github.com/Axway/Grapes/blob/ce9cc73d85f83eaa5fbc991abb593915a8c8374e/server/src/main/java/org/axway/grapes/server/core/ArtifactHandler.java#L256-L259 | train |
Axway/Grapes | server/src/main/java/org/axway/grapes/server/core/ArtifactHandler.java | ArtifactHandler.getArtifactLicenses | public List<DbLicense> getArtifactLicenses(final String gavc, final FiltersHolder filters) {
final DbArtifact artifact = getArtifact(gavc);
final List<DbLicense> licenses = new ArrayList<>();
for(final String name: artifact.getLicenses()){
final Set<DbLicense> matchingLicenses = lic... | java | public List<DbLicense> getArtifactLicenses(final String gavc, final FiltersHolder filters) {
final DbArtifact artifact = getArtifact(gavc);
final List<DbLicense> licenses = new ArrayList<>();
for(final String name: artifact.getLicenses()){
final Set<DbLicense> matchingLicenses = lic... | [
"public",
"List",
"<",
"DbLicense",
">",
"getArtifactLicenses",
"(",
"final",
"String",
"gavc",
",",
"final",
"FiltersHolder",
"filters",
")",
"{",
"final",
"DbArtifact",
"artifact",
"=",
"getArtifact",
"(",
"gavc",
")",
";",
"final",
"List",
"<",
"DbLicense",... | Return the list of licenses attached to an artifact
@param gavc String
@param filters FiltersHolder
@return List<DbLicense> | [
"Return",
"the",
"list",
"of",
"licenses",
"attached",
"to",
"an",
"artifact"
] | ce9cc73d85f83eaa5fbc991abb593915a8c8374e | https://github.com/Axway/Grapes/blob/ce9cc73d85f83eaa5fbc991abb593915a8c8374e/server/src/main/java/org/axway/grapes/server/core/ArtifactHandler.java#L268-L288 | train |
Axway/Grapes | server/src/main/java/org/axway/grapes/server/core/ArtifactHandler.java | ArtifactHandler.removeLicenseFromArtifact | public void removeLicenseFromArtifact(final String gavc, final String licenseId) {
final DbArtifact dbArtifact = getArtifact(gavc);
//
// The artifact may not have the exact string associated with it, but rather one
// matching license regexp expression.
//
repositoryHan... | java | public void removeLicenseFromArtifact(final String gavc, final String licenseId) {
final DbArtifact dbArtifact = getArtifact(gavc);
//
// The artifact may not have the exact string associated with it, but rather one
// matching license regexp expression.
//
repositoryHan... | [
"public",
"void",
"removeLicenseFromArtifact",
"(",
"final",
"String",
"gavc",
",",
"final",
"String",
"licenseId",
")",
"{",
"final",
"DbArtifact",
"dbArtifact",
"=",
"getArtifact",
"(",
"gavc",
")",
";",
"//",
"// The artifact may not have the exact string associated ... | Remove a license from an artifact
@param gavc String The artifact GAVC
@param licenseId String The license id to be removed. | [
"Remove",
"a",
"license",
"from",
"an",
"artifact"
] | ce9cc73d85f83eaa5fbc991abb593915a8c8374e | https://github.com/Axway/Grapes/blob/ce9cc73d85f83eaa5fbc991abb593915a8c8374e/server/src/main/java/org/axway/grapes/server/core/ArtifactHandler.java#L319-L327 | train |
Axway/Grapes | server/src/main/java/org/axway/grapes/server/core/ArtifactHandler.java | ArtifactHandler.getModuleJenkinsJobInfo | public String getModuleJenkinsJobInfo(final DbArtifact dbArtifact) {
final DbModule module = getModule(dbArtifact);
if(module == null){
return "";
}
final String jenkinsJobUrl = module.getBuildInfo().get("jenkins-job-url");
if(jenkinsJobUrl == null){
return "";
}
return jenkinsJobUrl;
} | java | public String getModuleJenkinsJobInfo(final DbArtifact dbArtifact) {
final DbModule module = getModule(dbArtifact);
if(module == null){
return "";
}
final String jenkinsJobUrl = module.getBuildInfo().get("jenkins-job-url");
if(jenkinsJobUrl == null){
return "";
}
return jenkinsJobUrl;
} | [
"public",
"String",
"getModuleJenkinsJobInfo",
"(",
"final",
"DbArtifact",
"dbArtifact",
")",
"{",
"final",
"DbModule",
"module",
"=",
"getModule",
"(",
"dbArtifact",
")",
";",
"if",
"(",
"module",
"==",
"null",
")",
"{",
"return",
"\"\"",
";",
"}",
"final",... | k
Returns a list of artifact regarding the filters
@return List<DbArtifact> | [
"k",
"Returns",
"a",
"list",
"of",
"artifact",
"regarding",
"the",
"filters"
] | ce9cc73d85f83eaa5fbc991abb593915a8c8374e | https://github.com/Axway/Grapes/blob/ce9cc73d85f83eaa5fbc991abb593915a8c8374e/server/src/main/java/org/axway/grapes/server/core/ArtifactHandler.java#L344-L357 | train |
kuali/ojb-1.0.4 | src/xdoclet/java/src/xdoclet/modules/ojb/constraints/JdbcTypeHelper.java | JdbcTypeHelper.getDefaultJdbcTypeFor | public static String getDefaultJdbcTypeFor(String javaType)
{
return _jdbcMappings.containsKey(javaType) ? (String)_jdbcMappings.get(javaType) : JDBC_DEFAULT_TYPE;
} | java | public static String getDefaultJdbcTypeFor(String javaType)
{
return _jdbcMappings.containsKey(javaType) ? (String)_jdbcMappings.get(javaType) : JDBC_DEFAULT_TYPE;
} | [
"public",
"static",
"String",
"getDefaultJdbcTypeFor",
"(",
"String",
"javaType",
")",
"{",
"return",
"_jdbcMappings",
".",
"containsKey",
"(",
"javaType",
")",
"?",
"(",
"String",
")",
"_jdbcMappings",
".",
"get",
"(",
"javaType",
")",
":",
"JDBC_DEFAULT_TYPE",... | Returns the default jdbc type for the given java type.
@param javaType The qualified java type
@return The default jdbc type | [
"Returns",
"the",
"default",
"jdbc",
"type",
"for",
"the",
"given",
"java",
"type",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/xdoclet/java/src/xdoclet/modules/ojb/constraints/JdbcTypeHelper.java#L104-L107 | train |
kuali/ojb-1.0.4 | src/xdoclet/java/src/xdoclet/modules/ojb/constraints/JdbcTypeHelper.java | JdbcTypeHelper.getDefaultConversionFor | public static String getDefaultConversionFor(String javaType)
{
return _jdbcConversions.containsKey(javaType) ? (String)_jdbcConversions.get(javaType) : null;
} | java | public static String getDefaultConversionFor(String javaType)
{
return _jdbcConversions.containsKey(javaType) ? (String)_jdbcConversions.get(javaType) : null;
} | [
"public",
"static",
"String",
"getDefaultConversionFor",
"(",
"String",
"javaType",
")",
"{",
"return",
"_jdbcConversions",
".",
"containsKey",
"(",
"javaType",
")",
"?",
"(",
"String",
")",
"_jdbcConversions",
".",
"get",
"(",
"javaType",
")",
":",
"null",
";... | Returns the default conversion for the given java type.
@param javaType The qualified java type
@return The default conversion or <code>null</code> if there is no default conversion for the type | [
"Returns",
"the",
"default",
"conversion",
"for",
"the",
"given",
"java",
"type",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/xdoclet/java/src/xdoclet/modules/ojb/constraints/JdbcTypeHelper.java#L115-L118 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/accesslayer/MtoNCollectionPrefetcher.java | MtoNCollectionPrefetcher.buildMtoNImplementorQuery | protected Query buildMtoNImplementorQuery(Collection ids)
{
String[] indFkCols = getFksToThisClass();
String[] indItemFkCols = getFksToItemClass();
FieldDescriptor[] pkFields = getOwnerClassDescriptor().getPkFields();
FieldDescriptor[] itemPkFields = getItemClassDescriptor().get... | java | protected Query buildMtoNImplementorQuery(Collection ids)
{
String[] indFkCols = getFksToThisClass();
String[] indItemFkCols = getFksToItemClass();
FieldDescriptor[] pkFields = getOwnerClassDescriptor().getPkFields();
FieldDescriptor[] itemPkFields = getItemClassDescriptor().get... | [
"protected",
"Query",
"buildMtoNImplementorQuery",
"(",
"Collection",
"ids",
")",
"{",
"String",
"[",
"]",
"indFkCols",
"=",
"getFksToThisClass",
"(",
")",
";",
"String",
"[",
"]",
"indItemFkCols",
"=",
"getFksToItemClass",
"(",
")",
";",
"FieldDescriptor",
"[",... | Build a query to read the mn-implementors
@param ids | [
"Build",
"a",
"query",
"to",
"read",
"the",
"mn",
"-",
"implementors"
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/MtoNCollectionPrefetcher.java#L136-L178 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/accesslayer/MtoNCollectionPrefetcher.java | MtoNCollectionPrefetcher.getFksToThisClass | private String[] getFksToThisClass()
{
String indTable = getCollectionDescriptor().getIndirectionTable();
String[] fks = getCollectionDescriptor().getFksToThisClass();
String[] result = new String[fks.length];
for (int i = 0; i < result.length; i++)
{
res... | java | private String[] getFksToThisClass()
{
String indTable = getCollectionDescriptor().getIndirectionTable();
String[] fks = getCollectionDescriptor().getFksToThisClass();
String[] result = new String[fks.length];
for (int i = 0; i < result.length; i++)
{
res... | [
"private",
"String",
"[",
"]",
"getFksToThisClass",
"(",
")",
"{",
"String",
"indTable",
"=",
"getCollectionDescriptor",
"(",
")",
".",
"getIndirectionTable",
"(",
")",
";",
"String",
"[",
"]",
"fks",
"=",
"getCollectionDescriptor",
"(",
")",
".",
"getFksToThi... | prefix the this class fk columns with the indirection table | [
"prefix",
"the",
"this",
"class",
"fk",
"columns",
"with",
"the",
"indirection",
"table"
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/MtoNCollectionPrefetcher.java#L183-L195 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/accesslayer/MtoNCollectionPrefetcher.java | MtoNCollectionPrefetcher.getPkFieldConversion | private FieldConversion[] getPkFieldConversion(ClassDescriptor cld)
{
FieldDescriptor[] pks = cld.getPkFields();
FieldConversion[] fc = new FieldConversion[pks.length];
for (int i= 0; i < pks.length; i++)
{
fc[i] = pks[i].getFieldConversion();
}
... | java | private FieldConversion[] getPkFieldConversion(ClassDescriptor cld)
{
FieldDescriptor[] pks = cld.getPkFields();
FieldConversion[] fc = new FieldConversion[pks.length];
for (int i= 0; i < pks.length; i++)
{
fc[i] = pks[i].getFieldConversion();
}
... | [
"private",
"FieldConversion",
"[",
"]",
"getPkFieldConversion",
"(",
"ClassDescriptor",
"cld",
")",
"{",
"FieldDescriptor",
"[",
"]",
"pks",
"=",
"cld",
".",
"getPkFields",
"(",
")",
";",
"FieldConversion",
"[",
"]",
"fc",
"=",
"new",
"FieldConversion",
"[",
... | Answer the FieldConversions for the PkFields
@param cld
@return the pk FieldConversions | [
"Answer",
"the",
"FieldConversions",
"for",
"the",
"PkFields"
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/MtoNCollectionPrefetcher.java#L368-L379 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/accesslayer/MtoNCollectionPrefetcher.java | MtoNCollectionPrefetcher.convert | private Object[] convert(FieldConversion[] fcs, Object[] values)
{
Object[] convertedValues = new Object[values.length];
for (int i= 0; i < values.length; i++)
{
convertedValues[i] = fcs[i].sqlToJava(values[i]);
}
return convertedValues;
} | java | private Object[] convert(FieldConversion[] fcs, Object[] values)
{
Object[] convertedValues = new Object[values.length];
for (int i= 0; i < values.length; i++)
{
convertedValues[i] = fcs[i].sqlToJava(values[i]);
}
return convertedValues;
} | [
"private",
"Object",
"[",
"]",
"convert",
"(",
"FieldConversion",
"[",
"]",
"fcs",
",",
"Object",
"[",
"]",
"values",
")",
"{",
"Object",
"[",
"]",
"convertedValues",
"=",
"new",
"Object",
"[",
"values",
".",
"length",
"]",
";",
"for",
"(",
"int",
"i... | Convert the Values using the FieldConversion.sqlToJava
@param fcs
@param values | [
"Convert",
"the",
"Values",
"using",
"the",
"FieldConversion",
".",
"sqlToJava"
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/MtoNCollectionPrefetcher.java#L386-L396 | train |
kuali/ojb-1.0.4 | src/prevayler/org/apache/ojb/broker/prevayler/demo/Application.java | Application.displayUseCases | public void displayUseCases()
{
System.out.println();
for (int i = 0; i < useCases.size(); i++)
{
System.out.println("[" + i + "] " + ((UseCase) useCases.get(i)).getDescription());
}
} | java | public void displayUseCases()
{
System.out.println();
for (int i = 0; i < useCases.size(); i++)
{
System.out.println("[" + i + "] " + ((UseCase) useCases.get(i)).getDescription());
}
} | [
"public",
"void",
"displayUseCases",
"(",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"useCases",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"System",
".",
"out",
".",
... | Disply available use cases. | [
"Disply",
"available",
"use",
"cases",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/prevayler/org/apache/ojb/broker/prevayler/demo/Application.java#L57-L64 | train |
kuali/ojb-1.0.4 | src/prevayler/org/apache/ojb/broker/prevayler/demo/Application.java | Application.run | public void run()
{
System.out.println(AsciiSplash.getSplashArt());
System.out.println("Welcome to the OJB PB tutorial application");
System.out.println();
// never stop (there is a special use case to quit the application)
while (true)
{
try
... | java | public void run()
{
System.out.println(AsciiSplash.getSplashArt());
System.out.println("Welcome to the OJB PB tutorial application");
System.out.println();
// never stop (there is a special use case to quit the application)
while (true)
{
try
... | [
"public",
"void",
"run",
"(",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
"AsciiSplash",
".",
"getSplashArt",
"(",
")",
")",
";",
"System",
".",
"out",
".",
"println",
"(",
"\"Welcome to the OJB PB tutorial application\"",
")",
";",
"System",
".",
... | the applications main loop. | [
"the",
"applications",
"main",
"loop",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/prevayler/org/apache/ojb/broker/prevayler/demo/Application.java#L93-L113 | train |
kuali/ojb-1.0.4 | src/prevayler/org/apache/ojb/broker/prevayler/demo/Application.java | Application.selectUseCase | public UseCase selectUseCase()
{
displayUseCases();
System.out.println("type in number to select a use case");
String in = readLine();
int index = Integer.parseInt(in);
return (UseCase) useCases.get(index);
} | java | public UseCase selectUseCase()
{
displayUseCases();
System.out.println("type in number to select a use case");
String in = readLine();
int index = Integer.parseInt(in);
return (UseCase) useCases.get(index);
} | [
"public",
"UseCase",
"selectUseCase",
"(",
")",
"{",
"displayUseCases",
"(",
")",
";",
"System",
".",
"out",
".",
"println",
"(",
"\"type in number to select a use case\"",
")",
";",
"String",
"in",
"=",
"readLine",
"(",
")",
";",
"int",
"index",
"=",
"Integ... | select a use case. | [
"select",
"a",
"use",
"case",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/prevayler/org/apache/ojb/broker/prevayler/demo/Application.java#L117-L124 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/ant/DBUtility.java | DBUtility.getJdbcType | public int getJdbcType(String ojbType) throws SQLException
{
int result;
if(ojbType == null) ojbType = "";
ojbType = ojbType.toLowerCase();
if (ojbType.equals("bit"))
result = Types.BIT;
else if (ojbType.equals("tinyint"))
result = Types.TINYINT;
... | java | public int getJdbcType(String ojbType) throws SQLException
{
int result;
if(ojbType == null) ojbType = "";
ojbType = ojbType.toLowerCase();
if (ojbType.equals("bit"))
result = Types.BIT;
else if (ojbType.equals("tinyint"))
result = Types.TINYINT;
... | [
"public",
"int",
"getJdbcType",
"(",
"String",
"ojbType",
")",
"throws",
"SQLException",
"{",
"int",
"result",
";",
"if",
"(",
"ojbType",
"==",
"null",
")",
"ojbType",
"=",
"\"\"",
";",
"ojbType",
"=",
"ojbType",
".",
"toLowerCase",
"(",
")",
";",
"if",
... | Determines the java.sql.Types constant value from an OJB
FIELDDESCRIPTOR value.
@param type The FIELDDESCRIPTOR which JDBC type is to be determined.
@return int the int value representing the Type according to
@throws SQLException if the type is not a valid jdbc type.
java.sql.Types | [
"Determines",
"the",
"java",
".",
"sql",
".",
"Types",
"constant",
"value",
"from",
"an",
"OJB",
"FIELDDESCRIPTOR",
"value",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/ant/DBUtility.java#L432-L489 | train |
jembi/openhim-mediator-engine-java | src/main/java/org/openhim/mediator/engine/RoutingTable.java | RoutingTable.addRoute | public void addRoute(String path, Class<? extends Actor> actorClass) throws RouteAlreadyMappedException {
addRoute(new Route(path, false), actorClass);
} | java | public void addRoute(String path, Class<? extends Actor> actorClass) throws RouteAlreadyMappedException {
addRoute(new Route(path, false), actorClass);
} | [
"public",
"void",
"addRoute",
"(",
"String",
"path",
",",
"Class",
"<",
"?",
"extends",
"Actor",
">",
"actorClass",
")",
"throws",
"RouteAlreadyMappedException",
"{",
"addRoute",
"(",
"new",
"Route",
"(",
"path",
",",
"false",
")",
",",
"actorClass",
")",
... | Add an exact path to the routing table.
@throws RouteAlreadyMappedException | [
"Add",
"an",
"exact",
"path",
"to",
"the",
"routing",
"table",
"."
] | 02adc0da4302cbde26cc9a5c1ce91ec6277e4f68 | https://github.com/jembi/openhim-mediator-engine-java/blob/02adc0da4302cbde26cc9a5c1ce91ec6277e4f68/src/main/java/org/openhim/mediator/engine/RoutingTable.java#L61-L63 | train |
jembi/openhim-mediator-engine-java | src/main/java/org/openhim/mediator/engine/RoutingTable.java | RoutingTable.addRegexRoute | public void addRegexRoute(String urlPattern, Class<? extends Actor> actorClass) throws RouteAlreadyMappedException {
addRoute(new Route(urlPattern, true), actorClass);
} | java | public void addRegexRoute(String urlPattern, Class<? extends Actor> actorClass) throws RouteAlreadyMappedException {
addRoute(new Route(urlPattern, true), actorClass);
} | [
"public",
"void",
"addRegexRoute",
"(",
"String",
"urlPattern",
",",
"Class",
"<",
"?",
"extends",
"Actor",
">",
"actorClass",
")",
"throws",
"RouteAlreadyMappedException",
"{",
"addRoute",
"(",
"new",
"Route",
"(",
"urlPattern",
",",
"true",
")",
",",
"actorC... | Add a URL pattern to the routing table.
@param urlPattern A regular expression
@throws RouteAlreadyMappedException | [
"Add",
"a",
"URL",
"pattern",
"to",
"the",
"routing",
"table",
"."
] | 02adc0da4302cbde26cc9a5c1ce91ec6277e4f68 | https://github.com/jembi/openhim-mediator-engine-java/blob/02adc0da4302cbde26cc9a5c1ce91ec6277e4f68/src/main/java/org/openhim/mediator/engine/RoutingTable.java#L71-L73 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/platforms/PlatformDb2Impl.java | PlatformDb2Impl.setObjectForStatement | public void setObjectForStatement(PreparedStatement ps, int index,
Object value, int sqlType) throws SQLException
{
if (sqlType == Types.TINYINT)
{
ps.setByte(index, ((Byte) value).byteValue());
}
else
{
s... | java | public void setObjectForStatement(PreparedStatement ps, int index,
Object value, int sqlType) throws SQLException
{
if (sqlType == Types.TINYINT)
{
ps.setByte(index, ((Byte) value).byteValue());
}
else
{
s... | [
"public",
"void",
"setObjectForStatement",
"(",
"PreparedStatement",
"ps",
",",
"int",
"index",
",",
"Object",
"value",
",",
"int",
"sqlType",
")",
"throws",
"SQLException",
"{",
"if",
"(",
"sqlType",
"==",
"Types",
".",
"TINYINT",
")",
"{",
"ps",
".",
"se... | Patch provided by Avril Kotzen (hi001@webmail.co.za)
DB2 handles TINYINT (for mapping a byte). | [
"Patch",
"provided",
"by",
"Avril",
"Kotzen",
"(",
"hi001"
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/platforms/PlatformDb2Impl.java#L134-L145 | train |
kuali/ojb-1.0.4 | src/ejb/org/apache/ojb/ejb/pb/PBBaseBeanImpl.java | PBBaseBeanImpl.getAllObjects | public Collection getAllObjects(Class target)
{
PersistenceBroker broker = getBroker();
Collection result;
try
{
Query q = new QueryByCriteria(target);
result = broker.getCollectionByQuery(q);
}
finally
{
if (brok... | java | public Collection getAllObjects(Class target)
{
PersistenceBroker broker = getBroker();
Collection result;
try
{
Query q = new QueryByCriteria(target);
result = broker.getCollectionByQuery(q);
}
finally
{
if (brok... | [
"public",
"Collection",
"getAllObjects",
"(",
"Class",
"target",
")",
"{",
"PersistenceBroker",
"broker",
"=",
"getBroker",
"(",
")",
";",
"Collection",
"result",
";",
"try",
"{",
"Query",
"q",
"=",
"new",
"QueryByCriteria",
"(",
"target",
")",
";",
"result"... | Return all objects for the given class. | [
"Return",
"all",
"objects",
"for",
"the",
"given",
"class",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/ejb/org/apache/ojb/ejb/pb/PBBaseBeanImpl.java#L109-L123 | train |
kuali/ojb-1.0.4 | src/ejb/org/apache/ojb/ejb/pb/PBBaseBeanImpl.java | PBBaseBeanImpl.deleteObject | public void deleteObject(Object object)
{
PersistenceBroker broker = null;
try
{
broker = getBroker();
broker.delete(object);
}
finally
{
if (broker != null) broker.close();
}
} | java | public void deleteObject(Object object)
{
PersistenceBroker broker = null;
try
{
broker = getBroker();
broker.delete(object);
}
finally
{
if (broker != null) broker.close();
}
} | [
"public",
"void",
"deleteObject",
"(",
"Object",
"object",
")",
"{",
"PersistenceBroker",
"broker",
"=",
"null",
";",
"try",
"{",
"broker",
"=",
"getBroker",
"(",
")",
";",
"broker",
".",
"delete",
"(",
"object",
")",
";",
"}",
"finally",
"{",
"if",
"(... | Delete an object. | [
"Delete",
"an",
"object",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/ejb/org/apache/ojb/ejb/pb/PBBaseBeanImpl.java#L145-L157 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/odmg/DatabaseImpl.java | DatabaseImpl.bind | public void bind(Object object, String name)
throws ObjectNameNotUniqueException
{
/**
* Is DB open? ODMG 3.0 says it has to be to call bind.
*/
if (!this.isOpen())
{
throw new DatabaseClosedException("Database is not open. Must have an open ... | java | public void bind(Object object, String name)
throws ObjectNameNotUniqueException
{
/**
* Is DB open? ODMG 3.0 says it has to be to call bind.
*/
if (!this.isOpen())
{
throw new DatabaseClosedException("Database is not open. Must have an open ... | [
"public",
"void",
"bind",
"(",
"Object",
"object",
",",
"String",
"name",
")",
"throws",
"ObjectNameNotUniqueException",
"{",
"/**\r\n * Is DB open? ODMG 3.0 says it has to be to call bind.\r\n */",
"if",
"(",
"!",
"this",
".",
"isOpen",
"(",
")",
")",
"... | Associate a name with an object and make it persistent.
An object instance may be bound to more than one name.
Binding a previously transient object to a name makes that object persistent.
@param object The object to be named.
@param name The name to be given to the object.
@exception org.odmg.ObjectNameNotUniqueExcept... | [
"Associate",
"a",
"name",
"with",
"an",
"object",
"and",
"make",
"it",
"persistent",
".",
"An",
"object",
"instance",
"may",
"be",
"bound",
"to",
"more",
"than",
"one",
"name",
".",
"Binding",
"a",
"previously",
"transient",
"object",
"to",
"a",
"name",
... | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/odmg/DatabaseImpl.java#L191-L211 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/odmg/DatabaseImpl.java | DatabaseImpl.lookup | public Object lookup(String name) throws ObjectNameNotFoundException
{
/**
* Is DB open? ODMG 3.0 says it has to be to call bind.
*/
if (!this.isOpen())
{
throw new DatabaseClosedException("Database is not open. Must have an open DB to call lookup");
... | java | public Object lookup(String name) throws ObjectNameNotFoundException
{
/**
* Is DB open? ODMG 3.0 says it has to be to call bind.
*/
if (!this.isOpen())
{
throw new DatabaseClosedException("Database is not open. Must have an open DB to call lookup");
... | [
"public",
"Object",
"lookup",
"(",
"String",
"name",
")",
"throws",
"ObjectNameNotFoundException",
"{",
"/**\r\n * Is DB open? ODMG 3.0 says it has to be to call bind.\r\n */",
"if",
"(",
"!",
"this",
".",
"isOpen",
"(",
")",
")",
"{",
"throw",
"new",
"D... | Lookup an object via its name.
@param name The name of an object.
@return The object with that name.
@exception ObjectNameNotFoundException There is no object with the specified name.
ObjectNameNotFoundException | [
"Lookup",
"an",
"object",
"via",
"its",
"name",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/odmg/DatabaseImpl.java#L220-L239 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/odmg/DatabaseImpl.java | DatabaseImpl.unbind | public void unbind(String name) throws ObjectNameNotFoundException
{
/**
* Is DB open? ODMG 3.0 says it has to be to call unbind.
*/
if (!this.isOpen())
{
throw new DatabaseClosedException("Database is not open. Must have an open DB to call unbind");
... | java | public void unbind(String name) throws ObjectNameNotFoundException
{
/**
* Is DB open? ODMG 3.0 says it has to be to call unbind.
*/
if (!this.isOpen())
{
throw new DatabaseClosedException("Database is not open. Must have an open DB to call unbind");
... | [
"public",
"void",
"unbind",
"(",
"String",
"name",
")",
"throws",
"ObjectNameNotFoundException",
"{",
"/**\r\n * Is DB open? ODMG 3.0 says it has to be to call unbind.\r\n */",
"if",
"(",
"!",
"this",
".",
"isOpen",
"(",
")",
")",
"{",
"throw",
"new",
"D... | Disassociate a name with an object
@param name The name of an object.
@exception ObjectNameNotFoundException No object exists in the database with that name. | [
"Disassociate",
"a",
"name",
"with",
"an",
"object"
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/odmg/DatabaseImpl.java#L246-L262 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/odmg/DatabaseImpl.java | DatabaseImpl.deletePersistent | public void deletePersistent(Object object)
{
if (!this.isOpen())
{
throw new DatabaseClosedException("Database is not open");
}
TransactionImpl tx = getTransaction();
if (tx == null || !tx.isOpen())
{
throw new TransactionNotInProgres... | java | public void deletePersistent(Object object)
{
if (!this.isOpen())
{
throw new DatabaseClosedException("Database is not open");
}
TransactionImpl tx = getTransaction();
if (tx == null || !tx.isOpen())
{
throw new TransactionNotInProgres... | [
"public",
"void",
"deletePersistent",
"(",
"Object",
"object",
")",
"{",
"if",
"(",
"!",
"this",
".",
"isOpen",
"(",
")",
")",
"{",
"throw",
"new",
"DatabaseClosedException",
"(",
"\"Database is not open\"",
")",
";",
"}",
"TransactionImpl",
"tx",
"=",
"getT... | Deletes an object from the database.
It must be executed in the context of an open transaction.
If the object is not persistent, then ObjectNotPersistent is thrown.
If the transaction in which this method is executed commits,
then the object is removed from the database.
If the transaction aborts,
then the deletePersis... | [
"Deletes",
"an",
"object",
"from",
"the",
"database",
".",
"It",
"must",
"be",
"executed",
"in",
"the",
"context",
"of",
"an",
"open",
"transaction",
".",
"If",
"the",
"object",
"is",
"not",
"persistent",
"then",
"ObjectNotPersistent",
"is",
"thrown",
".",
... | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/odmg/DatabaseImpl.java#L310-L324 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/accesslayer/sql/SqlMNStatement.java | SqlMNStatement.appendWhereClause | protected void appendWhereClause(StringBuffer stmt, Object[] columns)
{
stmt.append(" WHERE ");
for (int i = 0; i < columns.length; i++)
{
if (i > 0)
{
stmt.append(" AND ");
}
stmt.append(columns[i]);
stm... | java | protected void appendWhereClause(StringBuffer stmt, Object[] columns)
{
stmt.append(" WHERE ");
for (int i = 0; i < columns.length; i++)
{
if (i > 0)
{
stmt.append(" AND ");
}
stmt.append(columns[i]);
stm... | [
"protected",
"void",
"appendWhereClause",
"(",
"StringBuffer",
"stmt",
",",
"Object",
"[",
"]",
"columns",
")",
"{",
"stmt",
".",
"append",
"(",
"\" WHERE \"",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"columns",
".",
"length",
";",
... | Generate a sql where-clause matching the contraints defined by the array of fields
@param columns array containing all columns used in WHERE clause | [
"Generate",
"a",
"sql",
"where",
"-",
"clause",
"matching",
"the",
"contraints",
"defined",
"by",
"the",
"array",
"of",
"fields"
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/sql/SqlMNStatement.java#L87-L100 | train |
foundation-runtime/logging | logging-log4j/src/main/java/com/cisco/oss/foundation/logging/appender/FoundationRollEventListener.java | FoundationRollEventListener.logState | private void logState(final FileRollEvent fileRollEvent) {
// if (ApplicationState.isApplicationStateEnabled()) {
synchronized (this) {
final Collection<ApplicationState.ApplicationStateMessage> entries = ApplicationState.getAppStateEntries();
for (ApplicationState.ApplicationStateMessage entry : ... | java | private void logState(final FileRollEvent fileRollEvent) {
// if (ApplicationState.isApplicationStateEnabled()) {
synchronized (this) {
final Collection<ApplicationState.ApplicationStateMessage> entries = ApplicationState.getAppStateEntries();
for (ApplicationState.ApplicationStateMessage entry : ... | [
"private",
"void",
"logState",
"(",
"final",
"FileRollEvent",
"fileRollEvent",
")",
"{",
"//\t\tif (ApplicationState.isApplicationStateEnabled()) {",
"synchronized",
"(",
"this",
")",
"{",
"final",
"Collection",
"<",
"ApplicationState",
".",
"ApplicationStateMessage",
">",
... | Write all state items to the log file.
@param fileRollEvent the event to log | [
"Write",
"all",
"state",
"items",
"to",
"the",
"log",
"file",
"."
] | cd0a07b3c5b458ecf90ab92a1e0c72a067f5cbd6 | https://github.com/foundation-runtime/logging/blob/cd0a07b3c5b458ecf90ab92a1e0c72a067f5cbd6/logging-log4j/src/main/java/com/cisco/oss/foundation/logging/appender/FoundationRollEventListener.java#L48-L81 | train |
geomajas/geomajas-project-server | api/src/main/java/org/geomajas/layer/feature/attribute/ManyToOneAttribute.java | ManyToOneAttribute.setBooleanAttribute | public void setBooleanAttribute(String name, Boolean value) {
ensureValue();
Attribute attribute = new BooleanAttribute(value);
attribute.setEditable(isEditable(name));
getValue().getAllAttributes().put(name, attribute);
} | java | public void setBooleanAttribute(String name, Boolean value) {
ensureValue();
Attribute attribute = new BooleanAttribute(value);
attribute.setEditable(isEditable(name));
getValue().getAllAttributes().put(name, attribute);
} | [
"public",
"void",
"setBooleanAttribute",
"(",
"String",
"name",
",",
"Boolean",
"value",
")",
"{",
"ensureValue",
"(",
")",
";",
"Attribute",
"attribute",
"=",
"new",
"BooleanAttribute",
"(",
"value",
")",
";",
"attribute",
".",
"setEditable",
"(",
"isEditable... | Sets the specified boolean attribute to the specified value.
@param name name of the attribute
@param value value of the attribute
@since 1.9.0 | [
"Sets",
"the",
"specified",
"boolean",
"attribute",
"to",
"the",
"specified",
"value",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/api/src/main/java/org/geomajas/layer/feature/attribute/ManyToOneAttribute.java#L118-L123 | train |
geomajas/geomajas-project-server | api/src/main/java/org/geomajas/layer/feature/attribute/ManyToOneAttribute.java | ManyToOneAttribute.setFloatAttribute | public void setFloatAttribute(String name, Float value) {
ensureValue();
Attribute attribute = new FloatAttribute(value);
attribute.setEditable(isEditable(name));
getValue().getAllAttributes().put(name, attribute);
} | java | public void setFloatAttribute(String name, Float value) {
ensureValue();
Attribute attribute = new FloatAttribute(value);
attribute.setEditable(isEditable(name));
getValue().getAllAttributes().put(name, attribute);
} | [
"public",
"void",
"setFloatAttribute",
"(",
"String",
"name",
",",
"Float",
"value",
")",
"{",
"ensureValue",
"(",
")",
";",
"Attribute",
"attribute",
"=",
"new",
"FloatAttribute",
"(",
"value",
")",
";",
"attribute",
".",
"setEditable",
"(",
"isEditable",
"... | Sets the specified float attribute to the specified value.
@param name name of the attribute
@param value value of the attribute
@since 1.9.0 | [
"Sets",
"the",
"specified",
"float",
"attribute",
"to",
"the",
"specified",
"value",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/api/src/main/java/org/geomajas/layer/feature/attribute/ManyToOneAttribute.java#L174-L179 | train |
geomajas/geomajas-project-server | api/src/main/java/org/geomajas/layer/feature/attribute/ManyToOneAttribute.java | ManyToOneAttribute.setIntegerAttribute | public void setIntegerAttribute(String name, Integer value) {
ensureValue();
Attribute attribute = new IntegerAttribute(value);
attribute.setEditable(isEditable(name));
getValue().getAllAttributes().put(name, attribute);
} | java | public void setIntegerAttribute(String name, Integer value) {
ensureValue();
Attribute attribute = new IntegerAttribute(value);
attribute.setEditable(isEditable(name));
getValue().getAllAttributes().put(name, attribute);
} | [
"public",
"void",
"setIntegerAttribute",
"(",
"String",
"name",
",",
"Integer",
"value",
")",
"{",
"ensureValue",
"(",
")",
";",
"Attribute",
"attribute",
"=",
"new",
"IntegerAttribute",
"(",
"value",
")",
";",
"attribute",
".",
"setEditable",
"(",
"isEditable... | Sets the specified integer attribute to the specified value.
@param name name of the attribute
@param value value of the attribute
@since 1.9.0 | [
"Sets",
"the",
"specified",
"integer",
"attribute",
"to",
"the",
"specified",
"value",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/api/src/main/java/org/geomajas/layer/feature/attribute/ManyToOneAttribute.java#L202-L207 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.