id int32 0 165k | 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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
160,200 | j256/ormlite-core | src/main/java/com/j256/ormlite/table/TableUtils.java | TableUtils.createTable | public static <T> int createTable(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException {
Dao<T, ?> dao = DaoManager.createDao(connectionSource, dataClass);
return doCreateTable(dao, false);
} | java | public static <T> int createTable(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException {
Dao<T, ?> dao = DaoManager.createDao(connectionSource, dataClass);
return doCreateTable(dao, false);
} | [
"public",
"static",
"<",
"T",
">",
"int",
"createTable",
"(",
"ConnectionSource",
"connectionSource",
",",
"Class",
"<",
"T",
">",
"dataClass",
")",
"throws",
"SQLException",
"{",
"Dao",
"<",
"T",
",",
"?",
">",
"dao",
"=",
"DaoManager",
".",
"createDao",
... | Issue the database statements to create the table associated with a class.
@param connectionSource
Associated connection source.
@param dataClass
The class for which a table will be created.
@return The number of statements executed to do so. | [
"Issue",
"the",
"database",
"statements",
"to",
"create",
"the",
"table",
"associated",
"with",
"a",
"class",
"."
] | 154d85bbb9614a0ea65a012251257831fb4fba21 | https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/table/TableUtils.java#L53-L56 |
160,201 | j256/ormlite-core | src/main/java/com/j256/ormlite/table/TableUtils.java | TableUtils.createTable | public static <T> int createTable(ConnectionSource connectionSource, DatabaseTableConfig<T> tableConfig)
throws SQLException {
Dao<T, ?> dao = DaoManager.createDao(connectionSource, tableConfig);
return doCreateTable(dao, false);
} | java | public static <T> int createTable(ConnectionSource connectionSource, DatabaseTableConfig<T> tableConfig)
throws SQLException {
Dao<T, ?> dao = DaoManager.createDao(connectionSource, tableConfig);
return doCreateTable(dao, false);
} | [
"public",
"static",
"<",
"T",
">",
"int",
"createTable",
"(",
"ConnectionSource",
"connectionSource",
",",
"DatabaseTableConfig",
"<",
"T",
">",
"tableConfig",
")",
"throws",
"SQLException",
"{",
"Dao",
"<",
"T",
",",
"?",
">",
"dao",
"=",
"DaoManager",
".",... | Issue the database statements to create the table associated with a table configuration.
@param connectionSource
connectionSource Associated connection source.
@param tableConfig
Hand or spring wired table configuration. If null then the class must have {@link DatabaseField}
annotations.
@return The number of statemen... | [
"Issue",
"the",
"database",
"statements",
"to",
"create",
"the",
"table",
"associated",
"with",
"a",
"table",
"configuration",
"."
] | 154d85bbb9614a0ea65a012251257831fb4fba21 | https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/table/TableUtils.java#L88-L92 |
160,202 | j256/ormlite-core | src/main/java/com/j256/ormlite/table/TableUtils.java | TableUtils.dropTable | public static <T, ID> int dropTable(ConnectionSource connectionSource, Class<T> dataClass, boolean ignoreErrors)
throws SQLException {
Dao<T, ID> dao = DaoManager.createDao(connectionSource, dataClass);
return dropTable(dao, ignoreErrors);
} | java | public static <T, ID> int dropTable(ConnectionSource connectionSource, Class<T> dataClass, boolean ignoreErrors)
throws SQLException {
Dao<T, ID> dao = DaoManager.createDao(connectionSource, dataClass);
return dropTable(dao, ignoreErrors);
} | [
"public",
"static",
"<",
"T",
",",
"ID",
">",
"int",
"dropTable",
"(",
"ConnectionSource",
"connectionSource",
",",
"Class",
"<",
"T",
">",
"dataClass",
",",
"boolean",
"ignoreErrors",
")",
"throws",
"SQLException",
"{",
"Dao",
"<",
"T",
",",
"ID",
">",
... | Issue the database statements to drop the table associated with a class.
<p>
<b>WARNING:</b> This is [obviously] very destructive and is unrecoverable.
</p>
@param connectionSource
Associated connection source.
@param dataClass
The class for which a table will be dropped.
@param ignoreErrors
If set to true then try e... | [
"Issue",
"the",
"database",
"statements",
"to",
"drop",
"the",
"table",
"associated",
"with",
"a",
"class",
"."
] | 154d85bbb9614a0ea65a012251257831fb4fba21 | https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/table/TableUtils.java#L170-L174 |
160,203 | j256/ormlite-core | src/main/java/com/j256/ormlite/table/TableUtils.java | TableUtils.dropTable | public static <T, ID> int dropTable(Dao<T, ID> dao, boolean ignoreErrors) throws SQLException {
ConnectionSource connectionSource = dao.getConnectionSource();
Class<T> dataClass = dao.getDataClass();
DatabaseType databaseType = connectionSource.getDatabaseType();
if (dao instanceof BaseDaoImpl<?, ?>) {
retur... | java | public static <T, ID> int dropTable(Dao<T, ID> dao, boolean ignoreErrors) throws SQLException {
ConnectionSource connectionSource = dao.getConnectionSource();
Class<T> dataClass = dao.getDataClass();
DatabaseType databaseType = connectionSource.getDatabaseType();
if (dao instanceof BaseDaoImpl<?, ?>) {
retur... | [
"public",
"static",
"<",
"T",
",",
"ID",
">",
"int",
"dropTable",
"(",
"Dao",
"<",
"T",
",",
"ID",
">",
"dao",
",",
"boolean",
"ignoreErrors",
")",
"throws",
"SQLException",
"{",
"ConnectionSource",
"connectionSource",
"=",
"dao",
".",
"getConnectionSource",... | Issue the database statements to drop the table associated with a dao.
@param dao
Associated dao.
@return The number of statements executed to do so. | [
"Issue",
"the",
"database",
"statements",
"to",
"drop",
"the",
"table",
"associated",
"with",
"a",
"dao",
"."
] | 154d85bbb9614a0ea65a012251257831fb4fba21 | https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/table/TableUtils.java#L183-L193 |
160,204 | j256/ormlite-core | src/main/java/com/j256/ormlite/table/TableUtils.java | TableUtils.dropTable | public static <T, ID> int dropTable(ConnectionSource connectionSource, DatabaseTableConfig<T> tableConfig,
boolean ignoreErrors) throws SQLException {
DatabaseType databaseType = connectionSource.getDatabaseType();
Dao<T, ID> dao = DaoManager.createDao(connectionSource, tableConfig);
if (dao instanceof BaseDao... | java | public static <T, ID> int dropTable(ConnectionSource connectionSource, DatabaseTableConfig<T> tableConfig,
boolean ignoreErrors) throws SQLException {
DatabaseType databaseType = connectionSource.getDatabaseType();
Dao<T, ID> dao = DaoManager.createDao(connectionSource, tableConfig);
if (dao instanceof BaseDao... | [
"public",
"static",
"<",
"T",
",",
"ID",
">",
"int",
"dropTable",
"(",
"ConnectionSource",
"connectionSource",
",",
"DatabaseTableConfig",
"<",
"T",
">",
"tableConfig",
",",
"boolean",
"ignoreErrors",
")",
"throws",
"SQLException",
"{",
"DatabaseType",
"databaseTy... | Issue the database statements to drop the table associated with a table configuration.
<p>
<b>WARNING:</b> This is [obviously] very destructive and is unrecoverable.
</p>
@param connectionSource
Associated connection source.
@param tableConfig
Hand or spring wired table configuration. If null then the class must have... | [
"Issue",
"the",
"database",
"statements",
"to",
"drop",
"the",
"table",
"associated",
"with",
"a",
"table",
"configuration",
"."
] | 154d85bbb9614a0ea65a012251257831fb4fba21 | https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/table/TableUtils.java#L211-L222 |
160,205 | j256/ormlite-core | src/main/java/com/j256/ormlite/table/TableUtils.java | TableUtils.addDropTableStatements | private static <T, ID> void addDropTableStatements(DatabaseType databaseType, TableInfo<T, ID> tableInfo,
List<String> statements, boolean logDetails) {
List<String> statementsBefore = new ArrayList<String>();
List<String> statementsAfter = new ArrayList<String>();
for (FieldType fieldType : tableInfo.getField... | java | private static <T, ID> void addDropTableStatements(DatabaseType databaseType, TableInfo<T, ID> tableInfo,
List<String> statements, boolean logDetails) {
List<String> statementsBefore = new ArrayList<String>();
List<String> statementsAfter = new ArrayList<String>();
for (FieldType fieldType : tableInfo.getField... | [
"private",
"static",
"<",
"T",
",",
"ID",
">",
"void",
"addDropTableStatements",
"(",
"DatabaseType",
"databaseType",
",",
"TableInfo",
"<",
"T",
",",
"ID",
">",
"tableInfo",
",",
"List",
"<",
"String",
">",
"statements",
",",
"boolean",
"logDetails",
")",
... | Generate and return the list of statements to drop a database table. | [
"Generate",
"and",
"return",
"the",
"list",
"of",
"statements",
"to",
"drop",
"a",
"database",
"table",
"."
] | 154d85bbb9614a0ea65a012251257831fb4fba21 | https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/table/TableUtils.java#L319-L336 |
160,206 | j256/ormlite-core | src/main/java/com/j256/ormlite/table/TableUtils.java | TableUtils.addCreateTableStatements | private static <T, ID> void addCreateTableStatements(DatabaseType databaseType, TableInfo<T, ID> tableInfo,
List<String> statements, List<String> queriesAfter, boolean ifNotExists, boolean logDetails)
throws SQLException {
StringBuilder sb = new StringBuilder(256);
if (logDetails) {
logger.info("creating t... | java | private static <T, ID> void addCreateTableStatements(DatabaseType databaseType, TableInfo<T, ID> tableInfo,
List<String> statements, List<String> queriesAfter, boolean ifNotExists, boolean logDetails)
throws SQLException {
StringBuilder sb = new StringBuilder(256);
if (logDetails) {
logger.info("creating t... | [
"private",
"static",
"<",
"T",
",",
"ID",
">",
"void",
"addCreateTableStatements",
"(",
"DatabaseType",
"databaseType",
",",
"TableInfo",
"<",
"T",
",",
"ID",
">",
"tableInfo",
",",
"List",
"<",
"String",
">",
"statements",
",",
"List",
"<",
"String",
">",... | Generate and return the list of statements to create a database table and any associated features. | [
"Generate",
"and",
"return",
"the",
"list",
"of",
"statements",
"to",
"create",
"a",
"database",
"table",
"and",
"any",
"associated",
"features",
"."
] | 154d85bbb9614a0ea65a012251257831fb4fba21 | https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/table/TableUtils.java#L440-L495 |
160,207 | j256/ormlite-core | src/main/java/com/j256/ormlite/field/FieldType.java | FieldType.assignField | public void assignField(ConnectionSource connectionSource, Object data, Object val, boolean parentObject,
ObjectCache objectCache) throws SQLException {
if (logger.isLevelEnabled(Level.TRACE)) {
logger.trace("assiging from data {}, val {}: {}", (data == null ? "null" : data.getClass()),
(val == null ? "nu... | java | public void assignField(ConnectionSource connectionSource, Object data, Object val, boolean parentObject,
ObjectCache objectCache) throws SQLException {
if (logger.isLevelEnabled(Level.TRACE)) {
logger.trace("assiging from data {}, val {}: {}", (data == null ? "null" : data.getClass()),
(val == null ? "nu... | [
"public",
"void",
"assignField",
"(",
"ConnectionSource",
"connectionSource",
",",
"Object",
"data",
",",
"Object",
"val",
",",
"boolean",
"parentObject",
",",
"ObjectCache",
"objectCache",
")",
"throws",
"SQLException",
"{",
"if",
"(",
"logger",
".",
"isLevelEnab... | Assign to the data object the val corresponding to the fieldType. | [
"Assign",
"to",
"the",
"data",
"object",
"the",
"val",
"corresponding",
"to",
"the",
"fieldType",
"."
] | 154d85bbb9614a0ea65a012251257831fb4fba21 | https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/field/FieldType.java#L525-L582 |
160,208 | j256/ormlite-core | src/main/java/com/j256/ormlite/field/FieldType.java | FieldType.assignIdValue | public Object assignIdValue(ConnectionSource connectionSource, Object data, Number val, ObjectCache objectCache)
throws SQLException {
Object idVal = dataPersister.convertIdNumber(val);
if (idVal == null) {
throw new SQLException("Invalid class " + dataPersister + " for sequence-id " + this);
} else {
as... | java | public Object assignIdValue(ConnectionSource connectionSource, Object data, Number val, ObjectCache objectCache)
throws SQLException {
Object idVal = dataPersister.convertIdNumber(val);
if (idVal == null) {
throw new SQLException("Invalid class " + dataPersister + " for sequence-id " + this);
} else {
as... | [
"public",
"Object",
"assignIdValue",
"(",
"ConnectionSource",
"connectionSource",
",",
"Object",
"data",
",",
"Number",
"val",
",",
"ObjectCache",
"objectCache",
")",
"throws",
"SQLException",
"{",
"Object",
"idVal",
"=",
"dataPersister",
".",
"convertIdNumber",
"("... | Assign an ID value to this field. | [
"Assign",
"an",
"ID",
"value",
"to",
"this",
"field",
"."
] | 154d85bbb9614a0ea65a012251257831fb4fba21 | https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/field/FieldType.java#L587-L596 |
160,209 | j256/ormlite-core | src/main/java/com/j256/ormlite/field/FieldType.java | FieldType.extractRawJavaFieldValue | public <FV> FV extractRawJavaFieldValue(Object object) throws SQLException {
Object val;
if (fieldGetMethod == null) {
try {
// field object may not be a T yet
val = field.get(object);
} catch (Exception e) {
throw SqlExceptionUtil.create("Could not get field value for " + this, e);
}
} else ... | java | public <FV> FV extractRawJavaFieldValue(Object object) throws SQLException {
Object val;
if (fieldGetMethod == null) {
try {
// field object may not be a T yet
val = field.get(object);
} catch (Exception e) {
throw SqlExceptionUtil.create("Could not get field value for " + this, e);
}
} else ... | [
"public",
"<",
"FV",
">",
"FV",
"extractRawJavaFieldValue",
"(",
"Object",
"object",
")",
"throws",
"SQLException",
"{",
"Object",
"val",
";",
"if",
"(",
"fieldGetMethod",
"==",
"null",
")",
"{",
"try",
"{",
"// field object may not be a T yet",
"val",
"=",
"f... | Return the value from the field in the object that is defined by this FieldType. | [
"Return",
"the",
"value",
"from",
"the",
"field",
"in",
"the",
"object",
"that",
"is",
"defined",
"by",
"this",
"FieldType",
"."
] | 154d85bbb9614a0ea65a012251257831fb4fba21 | https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/field/FieldType.java#L601-L621 |
160,210 | j256/ormlite-core | src/main/java/com/j256/ormlite/field/FieldType.java | FieldType.extractJavaFieldValue | public Object extractJavaFieldValue(Object object) throws SQLException {
Object val = extractRawJavaFieldValue(object);
// if this is a foreign object then we want its reference field
if (foreignRefField != null && val != null) {
val = foreignRefField.extractRawJavaFieldValue(val);
}
return val;
} | java | public Object extractJavaFieldValue(Object object) throws SQLException {
Object val = extractRawJavaFieldValue(object);
// if this is a foreign object then we want its reference field
if (foreignRefField != null && val != null) {
val = foreignRefField.extractRawJavaFieldValue(val);
}
return val;
} | [
"public",
"Object",
"extractJavaFieldValue",
"(",
"Object",
"object",
")",
"throws",
"SQLException",
"{",
"Object",
"val",
"=",
"extractRawJavaFieldValue",
"(",
"object",
")",
";",
"// if this is a foreign object then we want its reference field",
"if",
"(",
"foreignRefFiel... | Return the value from the field in the object that is defined by this FieldType. If the field is a foreign object
then the ID of the field is returned instead. | [
"Return",
"the",
"value",
"from",
"the",
"field",
"in",
"the",
"object",
"that",
"is",
"defined",
"by",
"this",
"FieldType",
".",
"If",
"the",
"field",
"is",
"a",
"foreign",
"object",
"then",
"the",
"ID",
"of",
"the",
"field",
"is",
"returned",
"instead"... | 154d85bbb9614a0ea65a012251257831fb4fba21 | https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/field/FieldType.java#L627-L637 |
160,211 | j256/ormlite-core | src/main/java/com/j256/ormlite/field/FieldType.java | FieldType.convertJavaFieldToSqlArgValue | public Object convertJavaFieldToSqlArgValue(Object fieldVal) throws SQLException {
/*
* Limitation here. Some people may want to override the null with their own value in the converter but we
* currently don't allow that. Specifying a default value I guess is a better mechanism.
*/
if (fieldVal == null) {
... | java | public Object convertJavaFieldToSqlArgValue(Object fieldVal) throws SQLException {
/*
* Limitation here. Some people may want to override the null with their own value in the converter but we
* currently don't allow that. Specifying a default value I guess is a better mechanism.
*/
if (fieldVal == null) {
... | [
"public",
"Object",
"convertJavaFieldToSqlArgValue",
"(",
"Object",
"fieldVal",
")",
"throws",
"SQLException",
"{",
"/*\n\t\t * Limitation here. Some people may want to override the null with their own value in the converter but we\n\t\t * currently don't allow that. Specifying a default value I... | Convert a field value to something suitable to be stored in the database. | [
"Convert",
"a",
"field",
"value",
"to",
"something",
"suitable",
"to",
"be",
"stored",
"in",
"the",
"database",
"."
] | 154d85bbb9614a0ea65a012251257831fb4fba21 | https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/field/FieldType.java#L649-L659 |
160,212 | j256/ormlite-core | src/main/java/com/j256/ormlite/field/FieldType.java | FieldType.convertStringToJavaField | public Object convertStringToJavaField(String value, int columnPos) throws SQLException {
if (value == null) {
return null;
} else {
return fieldConverter.resultStringToJava(this, value, columnPos);
}
} | java | public Object convertStringToJavaField(String value, int columnPos) throws SQLException {
if (value == null) {
return null;
} else {
return fieldConverter.resultStringToJava(this, value, columnPos);
}
} | [
"public",
"Object",
"convertStringToJavaField",
"(",
"String",
"value",
",",
"int",
"columnPos",
")",
"throws",
"SQLException",
"{",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"else",
"{",
"return",
"fieldConverter",
".",
"result... | Convert a string value into the appropriate Java field value. | [
"Convert",
"a",
"string",
"value",
"into",
"the",
"appropriate",
"Java",
"field",
"value",
"."
] | 154d85bbb9614a0ea65a012251257831fb4fba21 | https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/field/FieldType.java#L664-L670 |
160,213 | j256/ormlite-core | src/main/java/com/j256/ormlite/field/FieldType.java | FieldType.moveToNextValue | public Object moveToNextValue(Object val) throws SQLException {
if (dataPersister == null) {
return null;
} else {
return dataPersister.moveToNextValue(val);
}
} | java | public Object moveToNextValue(Object val) throws SQLException {
if (dataPersister == null) {
return null;
} else {
return dataPersister.moveToNextValue(val);
}
} | [
"public",
"Object",
"moveToNextValue",
"(",
"Object",
"val",
")",
"throws",
"SQLException",
"{",
"if",
"(",
"dataPersister",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"else",
"{",
"return",
"dataPersister",
".",
"moveToNextValue",
"(",
"val",
")",
... | Move the SQL value to the next one for version processing. | [
"Move",
"the",
"SQL",
"value",
"to",
"the",
"next",
"one",
"for",
"version",
"processing",
"."
] | 154d85bbb9614a0ea65a012251257831fb4fba21 | https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/field/FieldType.java#L675-L681 |
160,214 | j256/ormlite-core | src/main/java/com/j256/ormlite/field/FieldType.java | FieldType.buildForeignCollection | public <FT, FID> BaseForeignCollection<FT, FID> buildForeignCollection(Object parent, FID id) throws SQLException {
// this can happen if we have a foreign-auto-refresh scenario
if (foreignFieldType == null) {
return null;
}
@SuppressWarnings("unchecked")
Dao<FT, FID> castDao = (Dao<FT, FID>) foreignDao;
... | java | public <FT, FID> BaseForeignCollection<FT, FID> buildForeignCollection(Object parent, FID id) throws SQLException {
// this can happen if we have a foreign-auto-refresh scenario
if (foreignFieldType == null) {
return null;
}
@SuppressWarnings("unchecked")
Dao<FT, FID> castDao = (Dao<FT, FID>) foreignDao;
... | [
"public",
"<",
"FT",
",",
"FID",
">",
"BaseForeignCollection",
"<",
"FT",
",",
"FID",
">",
"buildForeignCollection",
"(",
"Object",
"parent",
",",
"FID",
"id",
")",
"throws",
"SQLException",
"{",
"// this can happen if we have a foreign-auto-refresh scenario",
"if",
... | Build and return a foreign collection based on the field settings that matches the id argument. This can return
null in certain circumstances.
@param parent
The parent object that we will set on each item in the collection.
@param id
The id of the foreign object we will look for. This can be null if we are creating an... | [
"Build",
"and",
"return",
"a",
"foreign",
"collection",
"based",
"on",
"the",
"field",
"settings",
"that",
"matches",
"the",
"id",
"argument",
".",
"This",
"can",
"return",
"null",
"in",
"certain",
"circumstances",
"."
] | 154d85bbb9614a0ea65a012251257831fb4fba21 | https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/field/FieldType.java#L781-L823 |
160,215 | j256/ormlite-core | src/main/java/com/j256/ormlite/field/FieldType.java | FieldType.getFieldValueIfNotDefault | public <FV> FV getFieldValueIfNotDefault(Object object) throws SQLException {
@SuppressWarnings("unchecked")
FV fieldValue = (FV) extractJavaFieldValue(object);
if (isFieldValueDefault(fieldValue)) {
return null;
} else {
return fieldValue;
}
} | java | public <FV> FV getFieldValueIfNotDefault(Object object) throws SQLException {
@SuppressWarnings("unchecked")
FV fieldValue = (FV) extractJavaFieldValue(object);
if (isFieldValueDefault(fieldValue)) {
return null;
} else {
return fieldValue;
}
} | [
"public",
"<",
"FV",
">",
"FV",
"getFieldValueIfNotDefault",
"(",
"Object",
"object",
")",
"throws",
"SQLException",
"{",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"FV",
"fieldValue",
"=",
"(",
"FV",
")",
"extractJavaFieldValue",
"(",
"object",
")",
... | Return the value of field in the data argument if it is not the default value for the class. If it is the default
then null is returned. | [
"Return",
"the",
"value",
"of",
"field",
"in",
"the",
"data",
"argument",
"if",
"it",
"is",
"not",
"the",
"default",
"value",
"for",
"the",
"class",
".",
"If",
"it",
"is",
"the",
"default",
"then",
"null",
"is",
"returned",
"."
] | 154d85bbb9614a0ea65a012251257831fb4fba21 | https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/field/FieldType.java#L927-L935 |
160,216 | j256/ormlite-core | src/main/java/com/j256/ormlite/field/FieldType.java | FieldType.isObjectsFieldValueDefault | public boolean isObjectsFieldValueDefault(Object object) throws SQLException {
Object fieldValue = extractJavaFieldValue(object);
return isFieldValueDefault(fieldValue);
} | java | public boolean isObjectsFieldValueDefault(Object object) throws SQLException {
Object fieldValue = extractJavaFieldValue(object);
return isFieldValueDefault(fieldValue);
} | [
"public",
"boolean",
"isObjectsFieldValueDefault",
"(",
"Object",
"object",
")",
"throws",
"SQLException",
"{",
"Object",
"fieldValue",
"=",
"extractJavaFieldValue",
"(",
"object",
")",
";",
"return",
"isFieldValueDefault",
"(",
"fieldValue",
")",
";",
"}"
] | Return whether or not the data object has a default value passed for this field of this type. | [
"Return",
"whether",
"or",
"not",
"the",
"data",
"object",
"has",
"a",
"default",
"value",
"passed",
"for",
"this",
"field",
"of",
"this",
"type",
"."
] | 154d85bbb9614a0ea65a012251257831fb4fba21 | https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/field/FieldType.java#L940-L943 |
160,217 | j256/ormlite-core | src/main/java/com/j256/ormlite/field/FieldType.java | FieldType.getJavaDefaultValueDefault | public Object getJavaDefaultValueDefault() {
if (field.getType() == boolean.class) {
return DEFAULT_VALUE_BOOLEAN;
} else if (field.getType() == byte.class || field.getType() == Byte.class) {
return DEFAULT_VALUE_BYTE;
} else if (field.getType() == char.class || field.getType() == Character.class) {
retu... | java | public Object getJavaDefaultValueDefault() {
if (field.getType() == boolean.class) {
return DEFAULT_VALUE_BOOLEAN;
} else if (field.getType() == byte.class || field.getType() == Byte.class) {
return DEFAULT_VALUE_BYTE;
} else if (field.getType() == char.class || field.getType() == Character.class) {
retu... | [
"public",
"Object",
"getJavaDefaultValueDefault",
"(",
")",
"{",
"if",
"(",
"field",
".",
"getType",
"(",
")",
"==",
"boolean",
".",
"class",
")",
"{",
"return",
"DEFAULT_VALUE_BOOLEAN",
";",
"}",
"else",
"if",
"(",
"field",
".",
"getType",
"(",
")",
"==... | Return whether or not the field value passed in is the default value for the type of the field. Null will return
true. | [
"Return",
"whether",
"or",
"not",
"the",
"field",
"value",
"passed",
"in",
"is",
"the",
"default",
"value",
"for",
"the",
"type",
"of",
"the",
"field",
".",
"Null",
"will",
"return",
"true",
"."
] | 154d85bbb9614a0ea65a012251257831fb4fba21 | https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/field/FieldType.java#L949-L969 |
160,218 | j256/ormlite-core | src/main/java/com/j256/ormlite/field/FieldType.java | FieldType.createForeignShell | private <FT, FID> FT createForeignShell(ConnectionSource connectionSource, Object val, ObjectCache objectCache)
throws SQLException {
@SuppressWarnings("unchecked")
Dao<FT, FID> castDao = (Dao<FT, FID>) foreignDao;
FT foreignObject = castDao.createObjectInstance();
foreignIdField.assignField(connectionSource... | java | private <FT, FID> FT createForeignShell(ConnectionSource connectionSource, Object val, ObjectCache objectCache)
throws SQLException {
@SuppressWarnings("unchecked")
Dao<FT, FID> castDao = (Dao<FT, FID>) foreignDao;
FT foreignObject = castDao.createObjectInstance();
foreignIdField.assignField(connectionSource... | [
"private",
"<",
"FT",
",",
"FID",
">",
"FT",
"createForeignShell",
"(",
"ConnectionSource",
"connectionSource",
",",
"Object",
"val",
",",
"ObjectCache",
"objectCache",
")",
"throws",
"SQLException",
"{",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"Dao",
... | Create a shell object and assign its id field. | [
"Create",
"a",
"shell",
"object",
"and",
"assign",
"its",
"id",
"field",
"."
] | 154d85bbb9614a0ea65a012251257831fb4fba21 | https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/field/FieldType.java#L1084-L1091 |
160,219 | j256/ormlite-core | src/main/java/com/j256/ormlite/field/FieldType.java | FieldType.findForeignFieldType | private FieldType findForeignFieldType(Class<?> clazz, Class<?> foreignClass, Dao<?, ?> foreignDao)
throws SQLException {
String foreignColumnName = fieldConfig.getForeignCollectionForeignFieldName();
for (FieldType fieldType : foreignDao.getTableInfo().getFieldTypes()) {
if (fieldType.getType() == foreignCla... | java | private FieldType findForeignFieldType(Class<?> clazz, Class<?> foreignClass, Dao<?, ?> foreignDao)
throws SQLException {
String foreignColumnName = fieldConfig.getForeignCollectionForeignFieldName();
for (FieldType fieldType : foreignDao.getTableInfo().getFieldTypes()) {
if (fieldType.getType() == foreignCla... | [
"private",
"FieldType",
"findForeignFieldType",
"(",
"Class",
"<",
"?",
">",
"clazz",
",",
"Class",
"<",
"?",
">",
"foreignClass",
",",
"Dao",
"<",
"?",
",",
"?",
">",
"foreignDao",
")",
"throws",
"SQLException",
"{",
"String",
"foreignColumnName",
"=",
"f... | If we have a class Foo with a collection of Bar's then we go through Bar's DAO looking for a Foo field. We need
this field to build the query that is able to find all Bar's that have foo_id that matches our id. | [
"If",
"we",
"have",
"a",
"class",
"Foo",
"with",
"a",
"collection",
"of",
"Bar",
"s",
"then",
"we",
"go",
"through",
"Bar",
"s",
"DAO",
"looking",
"for",
"a",
"Foo",
"field",
".",
"We",
"need",
"this",
"field",
"to",
"build",
"the",
"query",
"that",
... | 154d85bbb9614a0ea65a012251257831fb4fba21 | https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/field/FieldType.java#L1109-L1132 |
160,220 | j256/ormlite-core | src/main/java/com/j256/ormlite/stmt/mapped/MappedQueryForFieldEq.java | MappedQueryForFieldEq.execute | public T execute(DatabaseConnection databaseConnection, ID id, ObjectCache objectCache) throws SQLException {
if (objectCache != null) {
T result = objectCache.get(clazz, id);
if (result != null) {
return result;
}
}
Object[] args = new Object[] { convertIdToFieldObject(id) };
// @SuppressWarnings(... | java | public T execute(DatabaseConnection databaseConnection, ID id, ObjectCache objectCache) throws SQLException {
if (objectCache != null) {
T result = objectCache.get(clazz, id);
if (result != null) {
return result;
}
}
Object[] args = new Object[] { convertIdToFieldObject(id) };
// @SuppressWarnings(... | [
"public",
"T",
"execute",
"(",
"DatabaseConnection",
"databaseConnection",
",",
"ID",
"id",
",",
"ObjectCache",
"objectCache",
")",
"throws",
"SQLException",
"{",
"if",
"(",
"objectCache",
"!=",
"null",
")",
"{",
"T",
"result",
"=",
"objectCache",
".",
"get",
... | Query for an object in the database which matches the id argument. | [
"Query",
"for",
"an",
"object",
"in",
"the",
"database",
"which",
"matches",
"the",
"id",
"argument",
"."
] | 154d85bbb9614a0ea65a012251257831fb4fba21 | https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/stmt/mapped/MappedQueryForFieldEq.java#L30-L53 |
160,221 | j256/ormlite-core | src/main/java/com/j256/ormlite/db/BaseDatabaseType.java | BaseDatabaseType.appendStringType | protected void appendStringType(StringBuilder sb, FieldType fieldType, int fieldWidth) {
if (isVarcharFieldWidthSupported()) {
sb.append("VARCHAR(").append(fieldWidth).append(')');
} else {
sb.append("VARCHAR");
}
} | java | protected void appendStringType(StringBuilder sb, FieldType fieldType, int fieldWidth) {
if (isVarcharFieldWidthSupported()) {
sb.append("VARCHAR(").append(fieldWidth).append(')');
} else {
sb.append("VARCHAR");
}
} | [
"protected",
"void",
"appendStringType",
"(",
"StringBuilder",
"sb",
",",
"FieldType",
"fieldType",
",",
"int",
"fieldWidth",
")",
"{",
"if",
"(",
"isVarcharFieldWidthSupported",
"(",
")",
")",
"{",
"sb",
".",
"append",
"(",
"\"VARCHAR(\"",
")",
".",
"append",... | Output the SQL type for a Java String. | [
"Output",
"the",
"SQL",
"type",
"for",
"a",
"Java",
"String",
"."
] | 154d85bbb9614a0ea65a012251257831fb4fba21 | https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/db/BaseDatabaseType.java#L205-L211 |
160,222 | j256/ormlite-core | src/main/java/com/j256/ormlite/db/BaseDatabaseType.java | BaseDatabaseType.appendDefaultValue | private void appendDefaultValue(StringBuilder sb, FieldType fieldType, Object defaultValue) {
if (fieldType.isEscapedDefaultValue()) {
appendEscapedWord(sb, defaultValue.toString());
} else {
sb.append(defaultValue);
}
} | java | private void appendDefaultValue(StringBuilder sb, FieldType fieldType, Object defaultValue) {
if (fieldType.isEscapedDefaultValue()) {
appendEscapedWord(sb, defaultValue.toString());
} else {
sb.append(defaultValue);
}
} | [
"private",
"void",
"appendDefaultValue",
"(",
"StringBuilder",
"sb",
",",
"FieldType",
"fieldType",
",",
"Object",
"defaultValue",
")",
"{",
"if",
"(",
"fieldType",
".",
"isEscapedDefaultValue",
"(",
")",
")",
"{",
"appendEscapedWord",
"(",
"sb",
",",
"defaultVa... | Output the SQL type for the default value for the type. | [
"Output",
"the",
"SQL",
"type",
"for",
"the",
"default",
"value",
"for",
"the",
"type",
"."
] | 154d85bbb9614a0ea65a012251257831fb4fba21 | https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/db/BaseDatabaseType.java#L315-L321 |
160,223 | j256/ormlite-core | src/main/java/com/j256/ormlite/db/BaseDatabaseType.java | BaseDatabaseType.addSingleUnique | private void addSingleUnique(StringBuilder sb, FieldType fieldType, List<String> additionalArgs,
List<String> statementsAfter) {
StringBuilder alterSb = new StringBuilder();
alterSb.append(" UNIQUE (");
appendEscapedEntityName(alterSb, fieldType.getColumnName());
alterSb.append(')');
additionalArgs.add(alt... | java | private void addSingleUnique(StringBuilder sb, FieldType fieldType, List<String> additionalArgs,
List<String> statementsAfter) {
StringBuilder alterSb = new StringBuilder();
alterSb.append(" UNIQUE (");
appendEscapedEntityName(alterSb, fieldType.getColumnName());
alterSb.append(')');
additionalArgs.add(alt... | [
"private",
"void",
"addSingleUnique",
"(",
"StringBuilder",
"sb",
",",
"FieldType",
"fieldType",
",",
"List",
"<",
"String",
">",
"additionalArgs",
",",
"List",
"<",
"String",
">",
"statementsAfter",
")",
"{",
"StringBuilder",
"alterSb",
"=",
"new",
"StringBuild... | Add SQL to handle a unique=true field. THis is not for uniqueCombo=true. | [
"Add",
"SQL",
"to",
"handle",
"a",
"unique",
"=",
"true",
"field",
".",
"THis",
"is",
"not",
"for",
"uniqueCombo",
"=",
"true",
"."
] | 154d85bbb9614a0ea65a012251257831fb4fba21 | https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/db/BaseDatabaseType.java#L631-L638 |
160,224 | j256/ormlite-core | src/main/java/com/j256/ormlite/field/DataPersisterManager.java | DataPersisterManager.registerDataPersisters | public static void registerDataPersisters(DataPersister... dataPersisters) {
// we build the map and replace it to lower the chance of concurrency issues
List<DataPersister> newList = new ArrayList<DataPersister>();
if (registeredPersisters != null) {
newList.addAll(registeredPersisters);
}
for (DataPersis... | java | public static void registerDataPersisters(DataPersister... dataPersisters) {
// we build the map and replace it to lower the chance of concurrency issues
List<DataPersister> newList = new ArrayList<DataPersister>();
if (registeredPersisters != null) {
newList.addAll(registeredPersisters);
}
for (DataPersis... | [
"public",
"static",
"void",
"registerDataPersisters",
"(",
"DataPersister",
"...",
"dataPersisters",
")",
"{",
"// we build the map and replace it to lower the chance of concurrency issues",
"List",
"<",
"DataPersister",
">",
"newList",
"=",
"new",
"ArrayList",
"<",
"DataPers... | Register a data type with the manager. | [
"Register",
"a",
"data",
"type",
"with",
"the",
"manager",
"."
] | 154d85bbb9614a0ea65a012251257831fb4fba21 | https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/field/DataPersisterManager.java#L51-L61 |
160,225 | j256/ormlite-core | src/main/java/com/j256/ormlite/field/DataPersisterManager.java | DataPersisterManager.lookupForField | public static DataPersister lookupForField(Field field) {
// see if the any of the registered persisters are valid first
if (registeredPersisters != null) {
for (DataPersister persister : registeredPersisters) {
if (persister.isValidForField(field)) {
return persister;
}
// check the classes in... | java | public static DataPersister lookupForField(Field field) {
// see if the any of the registered persisters are valid first
if (registeredPersisters != null) {
for (DataPersister persister : registeredPersisters) {
if (persister.isValidForField(field)) {
return persister;
}
// check the classes in... | [
"public",
"static",
"DataPersister",
"lookupForField",
"(",
"Field",
"field",
")",
"{",
"// see if the any of the registered persisters are valid first",
"if",
"(",
"registeredPersisters",
"!=",
"null",
")",
"{",
"for",
"(",
"DataPersister",
"persister",
":",
"registeredP... | Lookup the data-type associated with the class.
@return The associated data-type interface or null if none found. | [
"Lookup",
"the",
"data",
"-",
"type",
"associated",
"with",
"the",
"class",
"."
] | 154d85bbb9614a0ea65a012251257831fb4fba21 | https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/field/DataPersisterManager.java#L75-L111 |
160,226 | j256/ormlite-core | src/main/java/com/j256/ormlite/stmt/mapped/MappedUpdate.java | MappedUpdate.update | public int update(DatabaseConnection databaseConnection, T data, ObjectCache objectCache) throws SQLException {
try {
// there is always and id field as an argument so just return 0 lines updated
if (argFieldTypes.length <= 1) {
return 0;
}
Object[] args = getFieldObjects(data);
Object newVersion =... | java | public int update(DatabaseConnection databaseConnection, T data, ObjectCache objectCache) throws SQLException {
try {
// there is always and id field as an argument so just return 0 lines updated
if (argFieldTypes.length <= 1) {
return 0;
}
Object[] args = getFieldObjects(data);
Object newVersion =... | [
"public",
"int",
"update",
"(",
"DatabaseConnection",
"databaseConnection",
",",
"T",
"data",
",",
"ObjectCache",
"objectCache",
")",
"throws",
"SQLException",
"{",
"try",
"{",
"// there is always and id field as an argument so just return 0 lines updated",
"if",
"(",
"argF... | Update the object in the database. | [
"Update",
"the",
"object",
"in",
"the",
"database",
"."
] | 154d85bbb9614a0ea65a012251257831fb4fba21 | https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/stmt/mapped/MappedUpdate.java#L91-L134 |
160,227 | j256/ormlite-core | src/main/java/com/j256/ormlite/stmt/mapped/BaseMappedStatement.java | BaseMappedStatement.getFieldObjects | protected Object[] getFieldObjects(Object data) throws SQLException {
Object[] objects = new Object[argFieldTypes.length];
for (int i = 0; i < argFieldTypes.length; i++) {
FieldType fieldType = argFieldTypes[i];
if (fieldType.isAllowGeneratedIdInsert()) {
objects[i] = fieldType.getFieldValueIfNotDefault(d... | java | protected Object[] getFieldObjects(Object data) throws SQLException {
Object[] objects = new Object[argFieldTypes.length];
for (int i = 0; i < argFieldTypes.length; i++) {
FieldType fieldType = argFieldTypes[i];
if (fieldType.isAllowGeneratedIdInsert()) {
objects[i] = fieldType.getFieldValueIfNotDefault(d... | [
"protected",
"Object",
"[",
"]",
"getFieldObjects",
"(",
"Object",
"data",
")",
"throws",
"SQLException",
"{",
"Object",
"[",
"]",
"objects",
"=",
"new",
"Object",
"[",
"argFieldTypes",
".",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i... | Return the array of field objects pulled from the data object. | [
"Return",
"the",
"array",
"of",
"field",
"objects",
"pulled",
"from",
"the",
"data",
"object",
"."
] | 154d85bbb9614a0ea65a012251257831fb4fba21 | https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/stmt/mapped/BaseMappedStatement.java#L45-L60 |
160,228 | j256/ormlite-core | src/main/java/com/j256/ormlite/stmt/mapped/MappedPreparedStmt.java | MappedPreparedStmt.assignStatementArguments | private CompiledStatement assignStatementArguments(CompiledStatement stmt) throws SQLException {
boolean ok = false;
try {
if (limit != null) {
// we use this if SQL statement LIMITs are not supported by this database type
stmt.setMaxRows(limit.intValue());
}
// set any arguments if we are logging ... | java | private CompiledStatement assignStatementArguments(CompiledStatement stmt) throws SQLException {
boolean ok = false;
try {
if (limit != null) {
// we use this if SQL statement LIMITs are not supported by this database type
stmt.setMaxRows(limit.intValue());
}
// set any arguments if we are logging ... | [
"private",
"CompiledStatement",
"assignStatementArguments",
"(",
"CompiledStatement",
"stmt",
")",
"throws",
"SQLException",
"{",
"boolean",
"ok",
"=",
"false",
";",
"try",
"{",
"if",
"(",
"limit",
"!=",
"null",
")",
"{",
"// we use this if SQL statement LIMITs are no... | Assign arguments to the statement.
@return The statement passed in or null if it had to be closed on error. | [
"Assign",
"arguments",
"to",
"the",
"statement",
"."
] | 154d85bbb9614a0ea65a012251257831fb4fba21 | https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/stmt/mapped/MappedPreparedStmt.java#L89-L127 |
160,229 | j256/ormlite-core | src/main/java/com/j256/ormlite/support/BaseConnectionSource.java | BaseConnectionSource.getSavedConnection | protected DatabaseConnection getSavedConnection() {
NestedConnection nested = specialConnection.get();
if (nested == null) {
return null;
} else {
return nested.connection;
}
} | java | protected DatabaseConnection getSavedConnection() {
NestedConnection nested = specialConnection.get();
if (nested == null) {
return null;
} else {
return nested.connection;
}
} | [
"protected",
"DatabaseConnection",
"getSavedConnection",
"(",
")",
"{",
"NestedConnection",
"nested",
"=",
"specialConnection",
".",
"get",
"(",
")",
";",
"if",
"(",
"nested",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"else",
"{",
"return",
"nested... | Returns the connection that has been saved or null if none. | [
"Returns",
"the",
"connection",
"that",
"has",
"been",
"saved",
"or",
"null",
"if",
"none",
"."
] | 154d85bbb9614a0ea65a012251257831fb4fba21 | https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/support/BaseConnectionSource.java#L29-L36 |
160,230 | j256/ormlite-core | src/main/java/com/j256/ormlite/support/BaseConnectionSource.java | BaseConnectionSource.isSavedConnection | protected boolean isSavedConnection(DatabaseConnection connection) {
NestedConnection currentSaved = specialConnection.get();
if (currentSaved == null) {
return false;
} else if (currentSaved.connection == connection) {
// ignore the release when we have a saved connection
return true;
} else {
retu... | java | protected boolean isSavedConnection(DatabaseConnection connection) {
NestedConnection currentSaved = specialConnection.get();
if (currentSaved == null) {
return false;
} else if (currentSaved.connection == connection) {
// ignore the release when we have a saved connection
return true;
} else {
retu... | [
"protected",
"boolean",
"isSavedConnection",
"(",
"DatabaseConnection",
"connection",
")",
"{",
"NestedConnection",
"currentSaved",
"=",
"specialConnection",
".",
"get",
"(",
")",
";",
"if",
"(",
"currentSaved",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}... | Return true if the connection being released is the one that has been saved. | [
"Return",
"true",
"if",
"the",
"connection",
"being",
"released",
"is",
"the",
"one",
"that",
"has",
"been",
"saved",
"."
] | 154d85bbb9614a0ea65a012251257831fb4fba21 | https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/support/BaseConnectionSource.java#L41-L51 |
160,231 | j256/ormlite-core | src/main/java/com/j256/ormlite/support/BaseConnectionSource.java | BaseConnectionSource.clearSpecial | protected boolean clearSpecial(DatabaseConnection connection, Logger logger) {
NestedConnection currentSaved = specialConnection.get();
boolean cleared = false;
if (connection == null) {
// ignored
} else if (currentSaved == null) {
logger.error("no connection has been saved when clear() called");
} els... | java | protected boolean clearSpecial(DatabaseConnection connection, Logger logger) {
NestedConnection currentSaved = specialConnection.get();
boolean cleared = false;
if (connection == null) {
// ignored
} else if (currentSaved == null) {
logger.error("no connection has been saved when clear() called");
} els... | [
"protected",
"boolean",
"clearSpecial",
"(",
"DatabaseConnection",
"connection",
",",
"Logger",
"logger",
")",
"{",
"NestedConnection",
"currentSaved",
"=",
"specialConnection",
".",
"get",
"(",
")",
";",
"boolean",
"cleared",
"=",
"false",
";",
"if",
"(",
"conn... | Clear the connection that was previously saved.
@return True if the connection argument had been saved. | [
"Clear",
"the",
"connection",
"that",
"was",
"previously",
"saved",
"."
] | 154d85bbb9614a0ea65a012251257831fb4fba21 | https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/support/BaseConnectionSource.java#L80-L98 |
160,232 | j256/ormlite-core | src/main/java/com/j256/ormlite/support/BaseConnectionSource.java | BaseConnectionSource.isSingleConnection | protected boolean isSingleConnection(DatabaseConnection conn1, DatabaseConnection conn2) throws SQLException {
// initialize the connections auto-commit flags
conn1.setAutoCommit(true);
conn2.setAutoCommit(true);
try {
// change conn1's auto-commit to be false
conn1.setAutoCommit(false);
if (conn2.isAu... | java | protected boolean isSingleConnection(DatabaseConnection conn1, DatabaseConnection conn2) throws SQLException {
// initialize the connections auto-commit flags
conn1.setAutoCommit(true);
conn2.setAutoCommit(true);
try {
// change conn1's auto-commit to be false
conn1.setAutoCommit(false);
if (conn2.isAu... | [
"protected",
"boolean",
"isSingleConnection",
"(",
"DatabaseConnection",
"conn1",
",",
"DatabaseConnection",
"conn2",
")",
"throws",
"SQLException",
"{",
"// initialize the connections auto-commit flags",
"conn1",
".",
"setAutoCommit",
"(",
"true",
")",
";",
"conn2",
".",... | Return true if the two connections seem to one one connection under the covers. | [
"Return",
"true",
"if",
"the",
"two",
"connections",
"seem",
"to",
"one",
"one",
"connection",
"under",
"the",
"covers",
"."
] | 154d85bbb9614a0ea65a012251257831fb4fba21 | https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/support/BaseConnectionSource.java#L103-L121 |
160,233 | j256/ormlite-core | src/main/java/com/j256/ormlite/table/DatabaseTableConfigLoader.java | DatabaseTableConfigLoader.loadDatabaseConfigFromReader | public static List<DatabaseTableConfig<?>> loadDatabaseConfigFromReader(BufferedReader reader) throws SQLException {
List<DatabaseTableConfig<?>> list = new ArrayList<DatabaseTableConfig<?>>();
while (true) {
DatabaseTableConfig<?> config = DatabaseTableConfigLoader.fromReader(reader);
if (config == null) {
... | java | public static List<DatabaseTableConfig<?>> loadDatabaseConfigFromReader(BufferedReader reader) throws SQLException {
List<DatabaseTableConfig<?>> list = new ArrayList<DatabaseTableConfig<?>>();
while (true) {
DatabaseTableConfig<?> config = DatabaseTableConfigLoader.fromReader(reader);
if (config == null) {
... | [
"public",
"static",
"List",
"<",
"DatabaseTableConfig",
"<",
"?",
">",
">",
"loadDatabaseConfigFromReader",
"(",
"BufferedReader",
"reader",
")",
"throws",
"SQLException",
"{",
"List",
"<",
"DatabaseTableConfig",
"<",
"?",
">",
">",
"list",
"=",
"new",
"ArrayLis... | Load in a number of database configuration entries from a buffered reader. | [
"Load",
"in",
"a",
"number",
"of",
"database",
"configuration",
"entries",
"from",
"a",
"buffered",
"reader",
"."
] | 154d85bbb9614a0ea65a012251257831fb4fba21 | https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/table/DatabaseTableConfigLoader.java#L29-L39 |
160,234 | j256/ormlite-core | src/main/java/com/j256/ormlite/table/DatabaseTableConfigLoader.java | DatabaseTableConfigLoader.fromReader | public static <T> DatabaseTableConfig<T> fromReader(BufferedReader reader) throws SQLException {
DatabaseTableConfig<T> config = new DatabaseTableConfig<T>();
boolean anything = false;
while (true) {
String line;
try {
line = reader.readLine();
} catch (IOException e) {
throw SqlExceptionUtil.cre... | java | public static <T> DatabaseTableConfig<T> fromReader(BufferedReader reader) throws SQLException {
DatabaseTableConfig<T> config = new DatabaseTableConfig<T>();
boolean anything = false;
while (true) {
String line;
try {
line = reader.readLine();
} catch (IOException e) {
throw SqlExceptionUtil.cre... | [
"public",
"static",
"<",
"T",
">",
"DatabaseTableConfig",
"<",
"T",
">",
"fromReader",
"(",
"BufferedReader",
"reader",
")",
"throws",
"SQLException",
"{",
"DatabaseTableConfig",
"<",
"T",
">",
"config",
"=",
"new",
"DatabaseTableConfig",
"<",
"T",
">",
"(",
... | Load a table configuration in from a text-file reader.
@return A config if any of the fields were set otherwise null if we reach EOF. | [
"Load",
"a",
"table",
"configuration",
"in",
"from",
"a",
"text",
"-",
"file",
"reader",
"."
] | 154d85bbb9614a0ea65a012251257831fb4fba21 | https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/table/DatabaseTableConfigLoader.java#L46-L86 |
160,235 | j256/ormlite-core | src/main/java/com/j256/ormlite/table/DatabaseTableConfigLoader.java | DatabaseTableConfigLoader.write | public static <T> void write(BufferedWriter writer, DatabaseTableConfig<T> config) throws SQLException {
try {
writeConfig(writer, config);
} catch (IOException e) {
throw SqlExceptionUtil.create("Could not write config to writer", e);
}
} | java | public static <T> void write(BufferedWriter writer, DatabaseTableConfig<T> config) throws SQLException {
try {
writeConfig(writer, config);
} catch (IOException e) {
throw SqlExceptionUtil.create("Could not write config to writer", e);
}
} | [
"public",
"static",
"<",
"T",
">",
"void",
"write",
"(",
"BufferedWriter",
"writer",
",",
"DatabaseTableConfig",
"<",
"T",
">",
"config",
")",
"throws",
"SQLException",
"{",
"try",
"{",
"writeConfig",
"(",
"writer",
",",
"config",
")",
";",
"}",
"catch",
... | Write the table configuration to a buffered writer. | [
"Write",
"the",
"table",
"configuration",
"to",
"a",
"buffered",
"writer",
"."
] | 154d85bbb9614a0ea65a012251257831fb4fba21 | https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/table/DatabaseTableConfigLoader.java#L91-L97 |
160,236 | j256/ormlite-core | src/main/java/com/j256/ormlite/table/DatabaseTableConfigLoader.java | DatabaseTableConfigLoader.writeConfig | private static <T> void writeConfig(BufferedWriter writer, DatabaseTableConfig<T> config) throws IOException,
SQLException {
writer.append(CONFIG_FILE_START_MARKER);
writer.newLine();
if (config.getDataClass() != null) {
writer.append(FIELD_NAME_DATA_CLASS).append('=').append(config.getDataClass().getName()... | java | private static <T> void writeConfig(BufferedWriter writer, DatabaseTableConfig<T> config) throws IOException,
SQLException {
writer.append(CONFIG_FILE_START_MARKER);
writer.newLine();
if (config.getDataClass() != null) {
writer.append(FIELD_NAME_DATA_CLASS).append('=').append(config.getDataClass().getName()... | [
"private",
"static",
"<",
"T",
">",
"void",
"writeConfig",
"(",
"BufferedWriter",
"writer",
",",
"DatabaseTableConfig",
"<",
"T",
">",
"config",
")",
"throws",
"IOException",
",",
"SQLException",
"{",
"writer",
".",
"append",
"(",
"CONFIG_FILE_START_MARKER",
")"... | Write the config to the writer. | [
"Write",
"the",
"config",
"to",
"the",
"writer",
"."
] | 154d85bbb9614a0ea65a012251257831fb4fba21 | https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/table/DatabaseTableConfigLoader.java#L106-L129 |
160,237 | j256/ormlite-core | src/main/java/com/j256/ormlite/table/DatabaseTableConfigLoader.java | DatabaseTableConfigLoader.readTableField | private static <T> void readTableField(DatabaseTableConfig<T> config, String field, String value) {
if (field.equals(FIELD_NAME_DATA_CLASS)) {
try {
@SuppressWarnings("unchecked")
Class<T> clazz = (Class<T>) Class.forName(value);
config.setDataClass(clazz);
} catch (ClassNotFoundException e) {
t... | java | private static <T> void readTableField(DatabaseTableConfig<T> config, String field, String value) {
if (field.equals(FIELD_NAME_DATA_CLASS)) {
try {
@SuppressWarnings("unchecked")
Class<T> clazz = (Class<T>) Class.forName(value);
config.setDataClass(clazz);
} catch (ClassNotFoundException e) {
t... | [
"private",
"static",
"<",
"T",
">",
"void",
"readTableField",
"(",
"DatabaseTableConfig",
"<",
"T",
">",
"config",
",",
"String",
"field",
",",
"String",
"value",
")",
"{",
"if",
"(",
"field",
".",
"equals",
"(",
"FIELD_NAME_DATA_CLASS",
")",
")",
"{",
"... | Read a field into our table configuration for field=value line. | [
"Read",
"a",
"field",
"into",
"our",
"table",
"configuration",
"for",
"field",
"=",
"value",
"line",
"."
] | 154d85bbb9614a0ea65a012251257831fb4fba21 | https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/table/DatabaseTableConfigLoader.java#L134-L146 |
160,238 | j256/ormlite-core | src/main/java/com/j256/ormlite/table/DatabaseTableConfigLoader.java | DatabaseTableConfigLoader.readFields | private static <T> void readFields(BufferedReader reader, DatabaseTableConfig<T> config) throws SQLException {
List<DatabaseFieldConfig> fields = new ArrayList<DatabaseFieldConfig>();
while (true) {
String line;
try {
line = reader.readLine();
} catch (IOException e) {
throw SqlExceptionUtil.create... | java | private static <T> void readFields(BufferedReader reader, DatabaseTableConfig<T> config) throws SQLException {
List<DatabaseFieldConfig> fields = new ArrayList<DatabaseFieldConfig>();
while (true) {
String line;
try {
line = reader.readLine();
} catch (IOException e) {
throw SqlExceptionUtil.create... | [
"private",
"static",
"<",
"T",
">",
"void",
"readFields",
"(",
"BufferedReader",
"reader",
",",
"DatabaseTableConfig",
"<",
"T",
">",
"config",
")",
"throws",
"SQLException",
"{",
"List",
"<",
"DatabaseFieldConfig",
">",
"fields",
"=",
"new",
"ArrayList",
"<",... | Read all of the fields information from the configuration file. | [
"Read",
"all",
"of",
"the",
"fields",
"information",
"from",
"the",
"configuration",
"file",
"."
] | 154d85bbb9614a0ea65a012251257831fb4fba21 | https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/table/DatabaseTableConfigLoader.java#L151-L170 |
160,239 | HubSpot/jackson-datatype-protobuf | src/main/java/com/hubspot/jackson/datatype/protobuf/ProtobufDeserializer.java | ProtobufDeserializer.readKey | private Object readKey(
FieldDescriptor field,
JsonParser parser,
DeserializationContext context
) throws IOException {
if (parser.getCurrentToken() != JsonToken.FIELD_NAME) {
throw reportWrongToken(JsonToken.FIELD_NAME, context, "Expected FIELD_NAME token");
}
String ... | java | private Object readKey(
FieldDescriptor field,
JsonParser parser,
DeserializationContext context
) throws IOException {
if (parser.getCurrentToken() != JsonToken.FIELD_NAME) {
throw reportWrongToken(JsonToken.FIELD_NAME, context, "Expected FIELD_NAME token");
}
String ... | [
"private",
"Object",
"readKey",
"(",
"FieldDescriptor",
"field",
",",
"JsonParser",
"parser",
",",
"DeserializationContext",
"context",
")",
"throws",
"IOException",
"{",
"if",
"(",
"parser",
".",
"getCurrentToken",
"(",
")",
"!=",
"JsonToken",
".",
"FIELD_NAME",
... | Specialized version of readValue just for reading map keys, because the StdDeserializer methods like
_parseIntPrimitive blow up when the current JsonToken is FIELD_NAME | [
"Specialized",
"version",
"of",
"readValue",
"just",
"for",
"reading",
"map",
"keys",
"because",
"the",
"StdDeserializer",
"methods",
"like",
"_parseIntPrimitive",
"blow",
"up",
"when",
"the",
"current",
"JsonToken",
"is",
"FIELD_NAME"
] | 33c6c8085421387d43770c6599fe1b9cb27ad10e | https://github.com/HubSpot/jackson-datatype-protobuf/blob/33c6c8085421387d43770c6599fe1b9cb27ad10e/src/main/java/com/hubspot/jackson/datatype/protobuf/ProtobufDeserializer.java#L132-L196 |
160,240 | bujiio/buji-pac4j | src/main/java/io/buji/pac4j/util/ShiroHelper.java | ShiroHelper.populateSubject | public static void populateSubject(final LinkedHashMap<String, CommonProfile> profiles) {
if (profiles != null && profiles.size() > 0) {
final List<CommonProfile> listProfiles = ProfileHelper.flatIntoAProfileList(profiles);
try {
if (IS_FULLY_AUTHENTICATED_AUTHORIZER.isAu... | java | public static void populateSubject(final LinkedHashMap<String, CommonProfile> profiles) {
if (profiles != null && profiles.size() > 0) {
final List<CommonProfile> listProfiles = ProfileHelper.flatIntoAProfileList(profiles);
try {
if (IS_FULLY_AUTHENTICATED_AUTHORIZER.isAu... | [
"public",
"static",
"void",
"populateSubject",
"(",
"final",
"LinkedHashMap",
"<",
"String",
",",
"CommonProfile",
">",
"profiles",
")",
"{",
"if",
"(",
"profiles",
"!=",
"null",
"&&",
"profiles",
".",
"size",
"(",
")",
">",
"0",
")",
"{",
"final",
"List... | Populate the authenticated user profiles in the Shiro subject.
@param profiles the linked hashmap of profiles | [
"Populate",
"the",
"authenticated",
"user",
"profiles",
"in",
"the",
"Shiro",
"subject",
"."
] | 5ce149161f359074df09bc47b9f2aed8e17141a2 | https://github.com/bujiio/buji-pac4j/blob/5ce149161f359074df09bc47b9f2aed8e17141a2/src/main/java/io/buji/pac4j/util/ShiroHelper.java#L51-L64 |
160,241 | bujiio/buji-pac4j | src/main/java/io/buji/pac4j/subject/Pac4jPrincipal.java | Pac4jPrincipal.getName | @Override
public String getName() {
CommonProfile profile = this.getProfile();
if(null == principalNameAttribute) {
return profile.getId();
}
Object attrValue = profile.getAttribute(principalNameAttribute);
return (null == attrValue) ? null : String.valueOf(attrVa... | java | @Override
public String getName() {
CommonProfile profile = this.getProfile();
if(null == principalNameAttribute) {
return profile.getId();
}
Object attrValue = profile.getAttribute(principalNameAttribute);
return (null == attrValue) ? null : String.valueOf(attrVa... | [
"@",
"Override",
"public",
"String",
"getName",
"(",
")",
"{",
"CommonProfile",
"profile",
"=",
"this",
".",
"getProfile",
"(",
")",
";",
"if",
"(",
"null",
"==",
"principalNameAttribute",
")",
"{",
"return",
"profile",
".",
"getId",
"(",
")",
";",
"}",
... | Returns a name for the principal based upon one of the attributes
of the main CommonProfile. The attribute name used to query the CommonProfile
is specified in the constructor.
@return a name for the Principal or null if the attribute is not populated. | [
"Returns",
"a",
"name",
"for",
"the",
"principal",
"based",
"upon",
"one",
"of",
"the",
"attributes",
"of",
"the",
"main",
"CommonProfile",
".",
"The",
"attribute",
"name",
"used",
"to",
"query",
"the",
"CommonProfile",
"is",
"specified",
"in",
"the",
"const... | 5ce149161f359074df09bc47b9f2aed8e17141a2 | https://github.com/bujiio/buji-pac4j/blob/5ce149161f359074df09bc47b9f2aed8e17141a2/src/main/java/io/buji/pac4j/subject/Pac4jPrincipal.java#L107-L115 |
160,242 | Talend/tesb-rt-se | examples/tesb/library-service/common/src/main/java/org/talend/services/demos/common/Utils.java | Utils.showBooks | public static void showBooks(final ListOfBooks booksList){
if(booksList != null && booksList.getBook() != null && !booksList.getBook().isEmpty()){
List<BookType> books = booksList.getBook();
System.out.println("\nNumber of books: " + books.size());
int cnt = 0;
for (BookType book : boo... | java | public static void showBooks(final ListOfBooks booksList){
if(booksList != null && booksList.getBook() != null && !booksList.getBook().isEmpty()){
List<BookType> books = booksList.getBook();
System.out.println("\nNumber of books: " + books.size());
int cnt = 0;
for (BookType book : boo... | [
"public",
"static",
"void",
"showBooks",
"(",
"final",
"ListOfBooks",
"booksList",
")",
"{",
"if",
"(",
"booksList",
"!=",
"null",
"&&",
"booksList",
".",
"getBook",
"(",
")",
"!=",
"null",
"&&",
"!",
"booksList",
".",
"getBook",
"(",
")",
".",
"isEmpty"... | Show books.
@param booksList the books list | [
"Show",
"books",
"."
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/examples/tesb/library-service/common/src/main/java/org/talend/services/demos/common/Utils.java#L19-L45 |
160,243 | Talend/tesb-rt-se | examples/tesb/locator-service/soap-service/war/src/main/java/demo/service/ContextListener.java | ContextListener.contextInitialized | public void contextInitialized(ServletContextEvent event) {
this.context = event.getServletContext();
// Output a simple message to the server's console
System.out.println("The Simple Web App. Is Ready");
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
... | java | public void contextInitialized(ServletContextEvent event) {
this.context = event.getServletContext();
// Output a simple message to the server's console
System.out.println("The Simple Web App. Is Ready");
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
... | [
"public",
"void",
"contextInitialized",
"(",
"ServletContextEvent",
"event",
")",
"{",
"this",
".",
"context",
"=",
"event",
".",
"getServletContext",
"(",
")",
";",
"// Output a simple message to the server's console",
"System",
".",
"out",
".",
"println",
"(",
"\"... | is ready to service requests | [
"is",
"ready",
"to",
"service",
"requests"
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/examples/tesb/locator-service/soap-service/war/src/main/java/demo/service/ContextListener.java#L63-L85 |
160,244 | Talend/tesb-rt-se | locator/src/main/java/org/talend/esb/servicelocator/cxf/internal/CXFEndpointProvider.java | CXFEndpointProvider.serializeEPR | private void serializeEPR(EndpointReferenceType wsAddr, Node parent) throws ServiceLocatorException {
try {
JAXBElement<EndpointReferenceType> ep =
WSA_OBJECT_FACTORY.createEndpointReference(wsAddr);
createMarshaller().marshal(ep, parent);
} catch (JAXBException e... | java | private void serializeEPR(EndpointReferenceType wsAddr, Node parent) throws ServiceLocatorException {
try {
JAXBElement<EndpointReferenceType> ep =
WSA_OBJECT_FACTORY.createEndpointReference(wsAddr);
createMarshaller().marshal(ep, parent);
} catch (JAXBException e... | [
"private",
"void",
"serializeEPR",
"(",
"EndpointReferenceType",
"wsAddr",
",",
"Node",
"parent",
")",
"throws",
"ServiceLocatorException",
"{",
"try",
"{",
"JAXBElement",
"<",
"EndpointReferenceType",
">",
"ep",
"=",
"WSA_OBJECT_FACTORY",
".",
"createEndpointReference"... | Inserts a marshalled endpoint reference to a given DOM tree rooted by parent.
@param wsAddr
@param parent
@throws ServiceLocatorException | [
"Inserts",
"a",
"marshalled",
"endpoint",
"reference",
"to",
"a",
"given",
"DOM",
"tree",
"rooted",
"by",
"parent",
"."
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/locator/src/main/java/org/talend/esb/servicelocator/cxf/internal/CXFEndpointProvider.java#L205-L217 |
160,245 | Talend/tesb-rt-se | locator/src/main/java/org/talend/esb/servicelocator/cxf/internal/CXFEndpointProvider.java | CXFEndpointProvider.createEPR | private static EndpointReferenceType createEPR(String address, SLProperties props) {
EndpointReferenceType epr = WSAEndpointReferenceUtils.getEndpointReference(address);
if (props != null) {
addProperties(epr, props);
}
return epr;
} | java | private static EndpointReferenceType createEPR(String address, SLProperties props) {
EndpointReferenceType epr = WSAEndpointReferenceUtils.getEndpointReference(address);
if (props != null) {
addProperties(epr, props);
}
return epr;
} | [
"private",
"static",
"EndpointReferenceType",
"createEPR",
"(",
"String",
"address",
",",
"SLProperties",
"props",
")",
"{",
"EndpointReferenceType",
"epr",
"=",
"WSAEndpointReferenceUtils",
".",
"getEndpointReference",
"(",
"address",
")",
";",
"if",
"(",
"props",
... | Creates an endpoint reference from a given adress.
@param address
@param props
@return | [
"Creates",
"an",
"endpoint",
"reference",
"from",
"a",
"given",
"adress",
"."
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/locator/src/main/java/org/talend/esb/servicelocator/cxf/internal/CXFEndpointProvider.java#L279-L285 |
160,246 | Talend/tesb-rt-se | locator/src/main/java/org/talend/esb/servicelocator/cxf/internal/CXFEndpointProvider.java | CXFEndpointProvider.createEPR | private static EndpointReferenceType createEPR(Server server, String address, SLProperties props) {
EndpointReferenceType sourceEPR = server.getEndpoint().getEndpointInfo().getTarget();
EndpointReferenceType targetEPR = WSAEndpointReferenceUtils.duplicate(sourceEPR);
WSAEndpointReferenceUtils.se... | java | private static EndpointReferenceType createEPR(Server server, String address, SLProperties props) {
EndpointReferenceType sourceEPR = server.getEndpoint().getEndpointInfo().getTarget();
EndpointReferenceType targetEPR = WSAEndpointReferenceUtils.duplicate(sourceEPR);
WSAEndpointReferenceUtils.se... | [
"private",
"static",
"EndpointReferenceType",
"createEPR",
"(",
"Server",
"server",
",",
"String",
"address",
",",
"SLProperties",
"props",
")",
"{",
"EndpointReferenceType",
"sourceEPR",
"=",
"server",
".",
"getEndpoint",
"(",
")",
".",
"getEndpointInfo",
"(",
")... | Creates an endpoint reference by duplicating the endpoint reference of a given server.
@param server
@param address
@param props
@return | [
"Creates",
"an",
"endpoint",
"reference",
"by",
"duplicating",
"the",
"endpoint",
"reference",
"of",
"a",
"given",
"server",
"."
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/locator/src/main/java/org/talend/esb/servicelocator/cxf/internal/CXFEndpointProvider.java#L294-L303 |
160,247 | Talend/tesb-rt-se | locator/src/main/java/org/talend/esb/servicelocator/cxf/internal/CXFEndpointProvider.java | CXFEndpointProvider.addProperties | private static void addProperties(EndpointReferenceType epr, SLProperties props) {
MetadataType metadata = WSAEndpointReferenceUtils.getSetMetadata(epr);
ServiceLocatorPropertiesType jaxbProps = SLPropertiesConverter.toServiceLocatorPropertiesType(props);
JAXBElement<ServiceLocatorPropertiesTyp... | java | private static void addProperties(EndpointReferenceType epr, SLProperties props) {
MetadataType metadata = WSAEndpointReferenceUtils.getSetMetadata(epr);
ServiceLocatorPropertiesType jaxbProps = SLPropertiesConverter.toServiceLocatorPropertiesType(props);
JAXBElement<ServiceLocatorPropertiesTyp... | [
"private",
"static",
"void",
"addProperties",
"(",
"EndpointReferenceType",
"epr",
",",
"SLProperties",
"props",
")",
"{",
"MetadataType",
"metadata",
"=",
"WSAEndpointReferenceUtils",
".",
"getSetMetadata",
"(",
"epr",
")",
";",
"ServiceLocatorPropertiesType",
"jaxbPro... | Adds service locator properties to an endpoint reference.
@param epr
@param props | [
"Adds",
"service",
"locator",
"properties",
"to",
"an",
"endpoint",
"reference",
"."
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/locator/src/main/java/org/talend/esb/servicelocator/cxf/internal/CXFEndpointProvider.java#L310-L317 |
160,248 | Talend/tesb-rt-se | locator/src/main/java/org/talend/esb/servicelocator/cxf/internal/CXFEndpointProvider.java | CXFEndpointProvider.getServiceName | private static QName getServiceName(Server server) {
QName serviceName;
String bindingId = getBindingId(server);
EndpointInfo eInfo = server.getEndpoint().getEndpointInfo();
if (JAXRS_BINDING_ID.equals(bindingId)) {
serviceName = eInfo.getName();
} else {
... | java | private static QName getServiceName(Server server) {
QName serviceName;
String bindingId = getBindingId(server);
EndpointInfo eInfo = server.getEndpoint().getEndpointInfo();
if (JAXRS_BINDING_ID.equals(bindingId)) {
serviceName = eInfo.getName();
} else {
... | [
"private",
"static",
"QName",
"getServiceName",
"(",
"Server",
"server",
")",
"{",
"QName",
"serviceName",
";",
"String",
"bindingId",
"=",
"getBindingId",
"(",
"server",
")",
";",
"EndpointInfo",
"eInfo",
"=",
"server",
".",
"getEndpoint",
"(",
")",
".",
"g... | Extracts the service name from a Server.
@param server
@return | [
"Extracts",
"the",
"service",
"name",
"from",
"a",
"Server",
"."
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/locator/src/main/java/org/talend/esb/servicelocator/cxf/internal/CXFEndpointProvider.java#L324-L336 |
160,249 | Talend/tesb-rt-se | locator/src/main/java/org/talend/esb/servicelocator/cxf/internal/CXFEndpointProvider.java | CXFEndpointProvider.getBindingId | private static String getBindingId(Server server) {
Endpoint ep = server.getEndpoint();
BindingInfo bi = ep.getBinding().getBindingInfo();
return bi.getBindingId();
} | java | private static String getBindingId(Server server) {
Endpoint ep = server.getEndpoint();
BindingInfo bi = ep.getBinding().getBindingInfo();
return bi.getBindingId();
} | [
"private",
"static",
"String",
"getBindingId",
"(",
"Server",
"server",
")",
"{",
"Endpoint",
"ep",
"=",
"server",
".",
"getEndpoint",
"(",
")",
";",
"BindingInfo",
"bi",
"=",
"ep",
".",
"getBinding",
"(",
")",
".",
"getBindingInfo",
"(",
")",
";",
"retu... | Extracts the bindingId from a Server.
@param server
@return | [
"Extracts",
"the",
"bindingId",
"from",
"a",
"Server",
"."
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/locator/src/main/java/org/talend/esb/servicelocator/cxf/internal/CXFEndpointProvider.java#L343-L347 |
160,250 | Talend/tesb-rt-se | locator/src/main/java/org/talend/esb/servicelocator/cxf/internal/CXFEndpointProvider.java | CXFEndpointProvider.map2BindingType | private static BindingType map2BindingType(String bindingId) {
BindingType type;
if (SOAP11_BINDING_ID.equals(bindingId)) {
type = BindingType.SOAP11;
} else if (SOAP12_BINDING_ID.equals(bindingId)) {
type = BindingType.SOAP12;
} else if (JAXRS_BINDING_ID.equals(b... | java | private static BindingType map2BindingType(String bindingId) {
BindingType type;
if (SOAP11_BINDING_ID.equals(bindingId)) {
type = BindingType.SOAP11;
} else if (SOAP12_BINDING_ID.equals(bindingId)) {
type = BindingType.SOAP12;
} else if (JAXRS_BINDING_ID.equals(b... | [
"private",
"static",
"BindingType",
"map2BindingType",
"(",
"String",
"bindingId",
")",
"{",
"BindingType",
"type",
";",
"if",
"(",
"SOAP11_BINDING_ID",
".",
"equals",
"(",
"bindingId",
")",
")",
"{",
"type",
"=",
"BindingType",
".",
"SOAP11",
";",
"}",
"els... | Maps a bindingId to its corresponding BindingType.
@param bindingId
@return | [
"Maps",
"a",
"bindingId",
"to",
"its",
"corresponding",
"BindingType",
"."
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/locator/src/main/java/org/talend/esb/servicelocator/cxf/internal/CXFEndpointProvider.java#L363-L375 |
160,251 | Talend/tesb-rt-se | locator/src/main/java/org/talend/esb/servicelocator/cxf/internal/CXFEndpointProvider.java | CXFEndpointProvider.map2TransportType | private static TransportType map2TransportType(String transportId) {
TransportType type;
if (CXF_HTTP_TRANSPORT_ID.equals(transportId) || SOAP_HTTP_TRANSPORT_ID.equals(transportId)) {
type = TransportType.HTTP;
} else {
type = TransportType.OTHER;
}
return... | java | private static TransportType map2TransportType(String transportId) {
TransportType type;
if (CXF_HTTP_TRANSPORT_ID.equals(transportId) || SOAP_HTTP_TRANSPORT_ID.equals(transportId)) {
type = TransportType.HTTP;
} else {
type = TransportType.OTHER;
}
return... | [
"private",
"static",
"TransportType",
"map2TransportType",
"(",
"String",
"transportId",
")",
"{",
"TransportType",
"type",
";",
"if",
"(",
"CXF_HTTP_TRANSPORT_ID",
".",
"equals",
"(",
"transportId",
")",
"||",
"SOAP_HTTP_TRANSPORT_ID",
".",
"equals",
"(",
"transpor... | Maps a transportId to its corresponding TransportType.
@param transportId
@return | [
"Maps",
"a",
"transportId",
"to",
"its",
"corresponding",
"TransportType",
"."
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/locator/src/main/java/org/talend/esb/servicelocator/cxf/internal/CXFEndpointProvider.java#L382-L390 |
160,252 | Talend/tesb-rt-se | sam/sam-agent/src/main/java/org/talend/esb/sam/agent/eventproducer/MessageToEventMapper.java | MessageToEventMapper.getEventType | private EventTypeEnum getEventType(Message message) {
boolean isRequestor = MessageUtils.isRequestor(message);
boolean isFault = MessageUtils.isFault(message);
boolean isOutbound = MessageUtils.isOutbound(message);
//Needed because if it is rest request and method does not exists had be... | java | private EventTypeEnum getEventType(Message message) {
boolean isRequestor = MessageUtils.isRequestor(message);
boolean isFault = MessageUtils.isFault(message);
boolean isOutbound = MessageUtils.isOutbound(message);
//Needed because if it is rest request and method does not exists had be... | [
"private",
"EventTypeEnum",
"getEventType",
"(",
"Message",
"message",
")",
"{",
"boolean",
"isRequestor",
"=",
"MessageUtils",
".",
"isRequestor",
"(",
"message",
")",
";",
"boolean",
"isFault",
"=",
"MessageUtils",
".",
"isFault",
"(",
"message",
")",
";",
"... | Gets the event type from message.
@param message the message
@return the event type | [
"Gets",
"the",
"event",
"type",
"from",
"message",
"."
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-agent/src/main/java/org/talend/esb/sam/agent/eventproducer/MessageToEventMapper.java#L270-L298 |
160,253 | Talend/tesb-rt-se | sam/sam-agent/src/main/java/org/talend/esb/sam/agent/eventproducer/MessageToEventMapper.java | MessageToEventMapper.getPayload | protected String getPayload(Message message) {
try {
String encoding = (String) message.get(Message.ENCODING);
if (encoding == null) {
encoding = "UTF-8";
}
CachedOutputStream cos = message.getContent(CachedOutputStream.class);
if (cos ... | java | protected String getPayload(Message message) {
try {
String encoding = (String) message.get(Message.ENCODING);
if (encoding == null) {
encoding = "UTF-8";
}
CachedOutputStream cos = message.getContent(CachedOutputStream.class);
if (cos ... | [
"protected",
"String",
"getPayload",
"(",
"Message",
"message",
")",
"{",
"try",
"{",
"String",
"encoding",
"=",
"(",
"String",
")",
"message",
".",
"get",
"(",
"Message",
".",
"ENCODING",
")",
";",
"if",
"(",
"encoding",
"==",
"null",
")",
"{",
"encod... | Gets the message payload.
@param message the message
@return the payload | [
"Gets",
"the",
"message",
"payload",
"."
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-agent/src/main/java/org/talend/esb/sam/agent/eventproducer/MessageToEventMapper.java#L345-L361 |
160,254 | Talend/tesb-rt-se | sam/sam-agent/src/main/java/org/talend/esb/sam/agent/eventproducer/MessageToEventMapper.java | MessageToEventMapper.handleContentLength | private void handleContentLength(Event event) {
if (event.getContent() == null) {
return;
}
if (maxContentLength == -1 || event.getContent().length() <= maxContentLength) {
return;
}
if (maxContentLength < CUT_START_TAG.length() + CUT_END_TAG.length()) {... | java | private void handleContentLength(Event event) {
if (event.getContent() == null) {
return;
}
if (maxContentLength == -1 || event.getContent().length() <= maxContentLength) {
return;
}
if (maxContentLength < CUT_START_TAG.length() + CUT_END_TAG.length()) {... | [
"private",
"void",
"handleContentLength",
"(",
"Event",
"event",
")",
"{",
"if",
"(",
"event",
".",
"getContent",
"(",
")",
"==",
"null",
")",
"{",
"return",
";",
"}",
"if",
"(",
"maxContentLength",
"==",
"-",
"1",
"||",
"event",
".",
"getContent",
"("... | Handle content length.
@param event
the event | [
"Handle",
"content",
"length",
"."
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-agent/src/main/java/org/talend/esb/sam/agent/eventproducer/MessageToEventMapper.java#L388-L406 |
160,255 | Talend/tesb-rt-se | sam/sam-server/src/main/java/org/talend/esb/sam/server/persistence/criterias/CriteriaAdapter.java | CriteriaAdapter.getCriterias | private Map<String, Criteria> getCriterias(Map<String, String[]> params) {
Map<String, Criteria> result = new HashMap<String, Criteria>();
for (Map.Entry<String, String[]> param : params.entrySet()) {
for (Criteria criteria : FILTER_CRITERIAS) {
if (criteria.getName().equals(... | java | private Map<String, Criteria> getCriterias(Map<String, String[]> params) {
Map<String, Criteria> result = new HashMap<String, Criteria>();
for (Map.Entry<String, String[]> param : params.entrySet()) {
for (Criteria criteria : FILTER_CRITERIAS) {
if (criteria.getName().equals(... | [
"private",
"Map",
"<",
"String",
",",
"Criteria",
">",
"getCriterias",
"(",
"Map",
"<",
"String",
",",
"String",
"[",
"]",
">",
"params",
")",
"{",
"Map",
"<",
"String",
",",
"Criteria",
">",
"result",
"=",
"new",
"HashMap",
"<",
"String",
",",
"Crit... | Reads filter parameters.
@param params the params
@return the criterias | [
"Reads",
"filter",
"parameters",
"."
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-server/src/main/java/org/talend/esb/sam/server/persistence/criterias/CriteriaAdapter.java#L93-L112 |
160,256 | Talend/tesb-rt-se | locator/src/main/java/org/talend/esb/servicelocator/client/internal/ServiceLocatorImpl.java | ServiceLocatorImpl.setSessionTimeout | public void setSessionTimeout(int timeout) {
((ZKBackend) getBackend()).setSessionTimeout(timeout);
if (LOG.isLoggable(Level.FINE)) {
LOG.fine("Locator session timeout set to: " + timeout);
}
} | java | public void setSessionTimeout(int timeout) {
((ZKBackend) getBackend()).setSessionTimeout(timeout);
if (LOG.isLoggable(Level.FINE)) {
LOG.fine("Locator session timeout set to: " + timeout);
}
} | [
"public",
"void",
"setSessionTimeout",
"(",
"int",
"timeout",
")",
"{",
"(",
"(",
"ZKBackend",
")",
"getBackend",
"(",
")",
")",
".",
"setSessionTimeout",
"(",
"timeout",
")",
";",
"if",
"(",
"LOG",
".",
"isLoggable",
"(",
"Level",
".",
"FINE",
")",
")... | Specify the time out of the session established at the server. The
session is kept alive by requests sent by this client object. If the
session is idle for a period of time that would timeout the session, the
client will send a PING request to keep the session alive.
@param timeout timeout in milliseconds, must be gre... | [
"Specify",
"the",
"time",
"out",
"of",
"the",
"session",
"established",
"at",
"the",
"server",
".",
"The",
"session",
"is",
"kept",
"alive",
"by",
"requests",
"sent",
"by",
"this",
"client",
"object",
".",
"If",
"the",
"session",
"is",
"idle",
"for",
"a"... | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/locator/src/main/java/org/talend/esb/servicelocator/client/internal/ServiceLocatorImpl.java#L450-L456 |
160,257 | Talend/tesb-rt-se | examples/tesb/rent-a-car/app-reservation/src/main/java/org/talend/esb/client/commands/CarRent.java | CarRent.racRent | public void racRent() {
pos = pos - 1;
String userName = CarSearch.getLastSearchParams()[0];
String pickupDate = CarSearch.getLastSearchParams()[1];
String returnDate = CarSearch.getLastSearchParams()[2];
this.searcher.search(userName, pickupDate, returnDate);
if (searcher!=null && searcher.getCars()!= null... | java | public void racRent() {
pos = pos - 1;
String userName = CarSearch.getLastSearchParams()[0];
String pickupDate = CarSearch.getLastSearchParams()[1];
String returnDate = CarSearch.getLastSearchParams()[2];
this.searcher.search(userName, pickupDate, returnDate);
if (searcher!=null && searcher.getCars()!= null... | [
"public",
"void",
"racRent",
"(",
")",
"{",
"pos",
"=",
"pos",
"-",
"1",
";",
"String",
"userName",
"=",
"CarSearch",
".",
"getLastSearchParams",
"(",
")",
"[",
"0",
"]",
";",
"String",
"pickupDate",
"=",
"CarSearch",
".",
"getLastSearchParams",
"(",
")"... | Rent a car available in the last serach result
@param intp - the command interpreter instance | [
"Rent",
"a",
"car",
"available",
"in",
"the",
"last",
"serach",
"result"
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/examples/tesb/rent-a-car/app-reservation/src/main/java/org/talend/esb/client/commands/CarRent.java#L81-L118 |
160,258 | Talend/tesb-rt-se | locator/src/main/java/org/talend/esb/servicelocator/client/SLPropertiesImpl.java | SLPropertiesImpl.addProperty | public void addProperty(String name, String... values) {
List<String> valueList = new ArrayList<String>();
for (String value : values) {
valueList.add(value.trim());
}
properties.put(name.trim(), valueList);
} | java | public void addProperty(String name, String... values) {
List<String> valueList = new ArrayList<String>();
for (String value : values) {
valueList.add(value.trim());
}
properties.put(name.trim(), valueList);
} | [
"public",
"void",
"addProperty",
"(",
"String",
"name",
",",
"String",
"...",
"values",
")",
"{",
"List",
"<",
"String",
">",
"valueList",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"for",
"(",
"String",
"value",
":",
"values",
")",
... | Add a property with the given name and the given list of values to this Properties object. Name
and values are trimmed before the property is added.
@param name the name of the property, must not be <code>null</code>.
@param values the values of the property, must no be <code>null</code>,
none of the values must be <... | [
"Add",
"a",
"property",
"with",
"the",
"given",
"name",
"and",
"the",
"given",
"list",
"of",
"values",
"to",
"this",
"Properties",
"object",
".",
"Name",
"and",
"values",
"are",
"trimmed",
"before",
"the",
"property",
"is",
"added",
"."
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/locator/src/main/java/org/talend/esb/servicelocator/client/SLPropertiesImpl.java#L52-L58 |
160,259 | Talend/tesb-rt-se | locator/src/main/java/org/talend/esb/servicelocator/cxf/internal/LocatorRegistrar.java | LocatorRegistrar.getRegistrar | protected SingleBusLocatorRegistrar getRegistrar(Bus bus) {
SingleBusLocatorRegistrar registrar = busRegistrars.get(bus);
if (registrar == null) {
check(locatorClient, "serviceLocator", "registerService");
registrar = new SingleBusLocatorRegistrar(bus);
registrar.setS... | java | protected SingleBusLocatorRegistrar getRegistrar(Bus bus) {
SingleBusLocatorRegistrar registrar = busRegistrars.get(bus);
if (registrar == null) {
check(locatorClient, "serviceLocator", "registerService");
registrar = new SingleBusLocatorRegistrar(bus);
registrar.setS... | [
"protected",
"SingleBusLocatorRegistrar",
"getRegistrar",
"(",
"Bus",
"bus",
")",
"{",
"SingleBusLocatorRegistrar",
"registrar",
"=",
"busRegistrars",
".",
"get",
"(",
"bus",
")",
";",
"if",
"(",
"registrar",
"==",
"null",
")",
"{",
"check",
"(",
"locatorClient"... | Retrieves the registar linked to the bus.
Creates a new registar is not present.
@param bus
@return | [
"Retrieves",
"the",
"registar",
"linked",
"to",
"the",
"bus",
".",
"Creates",
"a",
"new",
"registar",
"is",
"not",
"present",
"."
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/locator/src/main/java/org/talend/esb/servicelocator/cxf/internal/LocatorRegistrar.java#L105-L120 |
160,260 | Talend/tesb-rt-se | examples/cxf/jaxrs-attachments/client/src/main/java/client/RESTClient.java | RESTClient.useXopAttachmentServiceWithWebClient | public void useXopAttachmentServiceWithWebClient() throws Exception {
final String serviceURI = "http://localhost:" + port + "/services/attachments/xop";
JAXRSClientFactoryBean factoryBean = new JAXRSClientFactoryBean();
factoryBean.setAddress(serviceURI);
factoryBean.setProper... | java | public void useXopAttachmentServiceWithWebClient() throws Exception {
final String serviceURI = "http://localhost:" + port + "/services/attachments/xop";
JAXRSClientFactoryBean factoryBean = new JAXRSClientFactoryBean();
factoryBean.setAddress(serviceURI);
factoryBean.setProper... | [
"public",
"void",
"useXopAttachmentServiceWithWebClient",
"(",
")",
"throws",
"Exception",
"{",
"final",
"String",
"serviceURI",
"=",
"\"http://localhost:\"",
"+",
"port",
"+",
"\"/services/attachments/xop\"",
";",
"JAXRSClientFactoryBean",
"factoryBean",
"=",
"new",
"JAX... | Writes and reads the XOP attachment using a CXF JAX-RS WebClient.
Note that WebClient is created with the help of JAXRSClientFactoryBean.
JAXRSClientFactoryBean can be used when neither of the WebClient factory
methods is appropriate. For example, in this case, an "mtom-enabled"
property is set on the factory bean firs... | [
"Writes",
"and",
"reads",
"the",
"XOP",
"attachment",
"using",
"a",
"CXF",
"JAX",
"-",
"RS",
"WebClient",
".",
"Note",
"that",
"WebClient",
"is",
"created",
"with",
"the",
"help",
"of",
"JAXRSClientFactoryBean",
".",
"JAXRSClientFactoryBean",
"can",
"be",
"use... | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/examples/cxf/jaxrs-attachments/client/src/main/java/client/RESTClient.java#L71-L92 |
160,261 | Talend/tesb-rt-se | examples/cxf/jaxrs-attachments/client/src/main/java/client/RESTClient.java | RESTClient.useXopAttachmentServiceWithProxy | public void useXopAttachmentServiceWithProxy() throws Exception {
final String serviceURI = "http://localhost:" + port + "/services/attachments";
XopAttachmentService proxy = JAXRSClientFactory.create(serviceURI,
XopAttachmentServ... | java | public void useXopAttachmentServiceWithProxy() throws Exception {
final String serviceURI = "http://localhost:" + port + "/services/attachments";
XopAttachmentService proxy = JAXRSClientFactory.create(serviceURI,
XopAttachmentServ... | [
"public",
"void",
"useXopAttachmentServiceWithProxy",
"(",
")",
"throws",
"Exception",
"{",
"final",
"String",
"serviceURI",
"=",
"\"http://localhost:\"",
"+",
"port",
"+",
"\"/services/attachments\"",
";",
"XopAttachmentService",
"proxy",
"=",
"JAXRSClientFactory",
".",
... | Writes and reads the XOP attachment using a CXF JAX-RS Proxy
The proxy automatically sets the "mtom-enabled" property by checking
the CXF EndpointProperty set on the XopAttachment interface.
@throws Exception | [
"Writes",
"and",
"reads",
"the",
"XOP",
"attachment",
"using",
"a",
"CXF",
"JAX",
"-",
"RS",
"Proxy",
"The",
"proxy",
"automatically",
"sets",
"the",
"mtom",
"-",
"enabled",
"property",
"by",
"checking",
"the",
"CXF",
"EndpointProperty",
"set",
"on",
"the",
... | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/examples/cxf/jaxrs-attachments/client/src/main/java/client/RESTClient.java#L101-L116 |
160,262 | Talend/tesb-rt-se | examples/cxf/jaxrs-attachments/client/src/main/java/client/RESTClient.java | RESTClient.createXopBean | private XopBean createXopBean() throws Exception {
XopBean xop = new XopBean();
xop.setName("xopName");
InputStream is = getClass().getResourceAsStream("/java.jpg");
byte[] data = IOUtils.readBytesFromStream(is);
// Pass java.jpg as an array of bytes
xo... | java | private XopBean createXopBean() throws Exception {
XopBean xop = new XopBean();
xop.setName("xopName");
InputStream is = getClass().getResourceAsStream("/java.jpg");
byte[] data = IOUtils.readBytesFromStream(is);
// Pass java.jpg as an array of bytes
xo... | [
"private",
"XopBean",
"createXopBean",
"(",
")",
"throws",
"Exception",
"{",
"XopBean",
"xop",
"=",
"new",
"XopBean",
"(",
")",
";",
"xop",
".",
"setName",
"(",
"\"xopName\"",
")",
";",
"InputStream",
"is",
"=",
"getClass",
"(",
")",
".",
"getResourceAsStr... | Creates a XopBean. The image on the disk is included as a byte array,
a DataHandler and java.awt.Image
@return the bean
@throws Exception | [
"Creates",
"a",
"XopBean",
".",
"The",
"image",
"on",
"the",
"disk",
"is",
"included",
"as",
"a",
"byte",
"array",
"a",
"DataHandler",
"and",
"java",
".",
"awt",
".",
"Image"
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/examples/cxf/jaxrs-attachments/client/src/main/java/client/RESTClient.java#L191-L212 |
160,263 | Talend/tesb-rt-se | examples/cxf/jaxrs-attachments/client/src/main/java/client/RESTClient.java | RESTClient.verifyXopResponse | private void verifyXopResponse(XopBean xopOriginal, XopBean xopResponse) {
if (!Arrays.equals(xopResponse.getBytes(), xopOriginal.getBytes())) {
throw new RuntimeException("Received XOP attachment is corrupted");
}
System.out.println();
System.out.println("XOP attachment has ... | java | private void verifyXopResponse(XopBean xopOriginal, XopBean xopResponse) {
if (!Arrays.equals(xopResponse.getBytes(), xopOriginal.getBytes())) {
throw new RuntimeException("Received XOP attachment is corrupted");
}
System.out.println();
System.out.println("XOP attachment has ... | [
"private",
"void",
"verifyXopResponse",
"(",
"XopBean",
"xopOriginal",
",",
"XopBean",
"xopResponse",
")",
"{",
"if",
"(",
"!",
"Arrays",
".",
"equals",
"(",
"xopResponse",
".",
"getBytes",
"(",
")",
",",
"xopOriginal",
".",
"getBytes",
"(",
")",
")",
")",... | Verifies that the received image is identical to the original one.
@param xopOriginal
@param xopResponse | [
"Verifies",
"that",
"the",
"received",
"image",
"is",
"identical",
"to",
"the",
"original",
"one",
"."
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/examples/cxf/jaxrs-attachments/client/src/main/java/client/RESTClient.java#L219-L225 |
160,264 | Talend/tesb-rt-se | sam/sam-service-soap/src/main/java/org/talend/esb/sam/service/soap/MonitoringWebService.java | MonitoringWebService.setMonitoringService | public void setMonitoringService(org.talend.esb.sam.common.service.MonitoringService monitoringService) {
this.monitoringService = monitoringService;
} | java | public void setMonitoringService(org.talend.esb.sam.common.service.MonitoringService monitoringService) {
this.monitoringService = monitoringService;
} | [
"public",
"void",
"setMonitoringService",
"(",
"org",
".",
"talend",
".",
"esb",
".",
"sam",
".",
"common",
".",
"service",
".",
"MonitoringService",
"monitoringService",
")",
"{",
"this",
".",
"monitoringService",
"=",
"monitoringService",
";",
"}"
] | Sets the monitoring service.
@param monitoringService the new monitoring service | [
"Sets",
"the",
"monitoring",
"service",
"."
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-service-soap/src/main/java/org/talend/esb/sam/service/soap/MonitoringWebService.java#L50-L52 |
160,265 | Talend/tesb-rt-se | sam/sam-service-soap/src/main/java/org/talend/esb/sam/service/soap/MonitoringWebService.java | MonitoringWebService.throwFault | private static void throwFault(String code, String message, Throwable t) throws PutEventsFault {
if (LOG.isLoggable(Level.SEVERE)) {
LOG.log(Level.SEVERE, "Throw Fault " + code + " " + message, t);
}
FaultType faultType = new FaultType();
faultType.setFaultCode(code);
... | java | private static void throwFault(String code, String message, Throwable t) throws PutEventsFault {
if (LOG.isLoggable(Level.SEVERE)) {
LOG.log(Level.SEVERE, "Throw Fault " + code + " " + message, t);
}
FaultType faultType = new FaultType();
faultType.setFaultCode(code);
... | [
"private",
"static",
"void",
"throwFault",
"(",
"String",
"code",
",",
"String",
"message",
",",
"Throwable",
"t",
")",
"throws",
"PutEventsFault",
"{",
"if",
"(",
"LOG",
".",
"isLoggable",
"(",
"Level",
".",
"SEVERE",
")",
")",
"{",
"LOG",
".",
"log",
... | Throw fault.
@param code the fault code
@param message the message
@param t the throwable type
@throws PutEventsFault | [
"Throw",
"fault",
"."
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-service-soap/src/main/java/org/talend/esb/sam/service/soap/MonitoringWebService.java#L91-L108 |
160,266 | Talend/tesb-rt-se | sam/sam-agent/src/main/java/org/talend/esb/sam/agent/serviceclient/MonitoringServiceWrapper.java | MonitoringServiceWrapper.putEvents | public void putEvents(List<Event> events) {
Exception lastException;
List<EventType> eventTypes = new ArrayList<EventType>();
for (Event event : events) {
EventType eventType = EventMapper.map(event);
eventTypes.add(eventType);
}
int i = 0;
lastEx... | java | public void putEvents(List<Event> events) {
Exception lastException;
List<EventType> eventTypes = new ArrayList<EventType>();
for (Event event : events) {
EventType eventType = EventMapper.map(event);
eventTypes.add(eventType);
}
int i = 0;
lastEx... | [
"public",
"void",
"putEvents",
"(",
"List",
"<",
"Event",
">",
"events",
")",
"{",
"Exception",
"lastException",
";",
"List",
"<",
"EventType",
">",
"eventTypes",
"=",
"new",
"ArrayList",
"<",
"EventType",
">",
"(",
")",
";",
"for",
"(",
"Event",
"event"... | Sends all events to the web service. Events will be transformed with mapper before sending.
@param events the events | [
"Sends",
"all",
"events",
"to",
"the",
"web",
"service",
".",
"Events",
"will",
"be",
"transformed",
"with",
"mapper",
"before",
"sending",
"."
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-agent/src/main/java/org/talend/esb/sam/agent/serviceclient/MonitoringServiceWrapper.java#L89-L120 |
160,267 | Talend/tesb-rt-se | sam/sam-agent/src/main/java/org/talend/esb/sam/agent/activator/AgentActivator.java | AgentActivator.createEventType | private EventType createEventType(EventEnumType type) {
EventType eventType = new EventType();
eventType.setTimestamp(Converter.convertDate(new Date()));
eventType.setEventType(type);
OriginatorType origType = new OriginatorType();
origType.setProcessId(Converter.getPID());
... | java | private EventType createEventType(EventEnumType type) {
EventType eventType = new EventType();
eventType.setTimestamp(Converter.convertDate(new Date()));
eventType.setEventType(type);
OriginatorType origType = new OriginatorType();
origType.setProcessId(Converter.getPID());
... | [
"private",
"EventType",
"createEventType",
"(",
"EventEnumType",
"type",
")",
"{",
"EventType",
"eventType",
"=",
"new",
"EventType",
"(",
")",
";",
"eventType",
".",
"setTimestamp",
"(",
"Converter",
".",
"convertDate",
"(",
"new",
"Date",
"(",
")",
")",
")... | Creates the event type.
@param type the EventEnumType
@return the event type | [
"Creates",
"the",
"event",
"type",
"."
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-agent/src/main/java/org/talend/esb/sam/agent/activator/AgentActivator.java#L98-L124 |
160,268 | Talend/tesb-rt-se | sam/sam-agent/src/main/java/org/talend/esb/sam/agent/activator/AgentActivator.java | AgentActivator.putEvent | private void putEvent(EventType eventType) throws Exception {
List<EventType> eventTypes = Collections.singletonList(eventType);
int i;
for (i = 0; i < retryNum; ++i) {
try {
monitoringService.putEvents(eventTypes);
break;
} catch (Excepti... | java | private void putEvent(EventType eventType) throws Exception {
List<EventType> eventTypes = Collections.singletonList(eventType);
int i;
for (i = 0; i < retryNum; ++i) {
try {
monitoringService.putEvents(eventTypes);
break;
} catch (Excepti... | [
"private",
"void",
"putEvent",
"(",
"EventType",
"eventType",
")",
"throws",
"Exception",
"{",
"List",
"<",
"EventType",
">",
"eventTypes",
"=",
"Collections",
".",
"singletonList",
"(",
"eventType",
")",
";",
"int",
"i",
";",
"for",
"(",
"i",
"=",
"0",
... | Put event.
@param eventType the event type
@throws Exception the exception | [
"Put",
"event",
"."
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-agent/src/main/java/org/talend/esb/sam/agent/activator/AgentActivator.java#L132-L151 |
160,269 | Talend/tesb-rt-se | sam/sam-agent/src/main/java/org/talend/esb/sam/agent/activator/AgentActivator.java | AgentActivator.checkConfig | private boolean checkConfig(BundleContext context) throws Exception {
ServiceReference serviceRef = context.getServiceReference(ConfigurationAdmin.class.getName());
ConfigurationAdmin cfgAdmin = (ConfigurationAdmin)context.getService(serviceRef);
Configuration config = cfgAdmin.getConfiguration... | java | private boolean checkConfig(BundleContext context) throws Exception {
ServiceReference serviceRef = context.getServiceReference(ConfigurationAdmin.class.getName());
ConfigurationAdmin cfgAdmin = (ConfigurationAdmin)context.getService(serviceRef);
Configuration config = cfgAdmin.getConfiguration... | [
"private",
"boolean",
"checkConfig",
"(",
"BundleContext",
"context",
")",
"throws",
"Exception",
"{",
"ServiceReference",
"serviceRef",
"=",
"context",
".",
"getServiceReference",
"(",
"ConfigurationAdmin",
".",
"class",
".",
"getName",
"(",
")",
")",
";",
"Confi... | Check config.
@param context the context
@return true, if successful
@throws Exception the exception | [
"Check",
"config",
"."
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-agent/src/main/java/org/talend/esb/sam/agent/activator/AgentActivator.java#L160-L166 |
160,270 | Talend/tesb-rt-se | sam/sam-agent/src/main/java/org/talend/esb/sam/agent/activator/AgentActivator.java | AgentActivator.initWsClient | private void initWsClient(BundleContext context) throws Exception {
ServiceReference serviceRef = context.getServiceReference(ConfigurationAdmin.class.getName());
ConfigurationAdmin cfgAdmin = (ConfigurationAdmin)context.getService(serviceRef);
Configuration config = cfgAdmin.getConfiguration("... | java | private void initWsClient(BundleContext context) throws Exception {
ServiceReference serviceRef = context.getServiceReference(ConfigurationAdmin.class.getName());
ConfigurationAdmin cfgAdmin = (ConfigurationAdmin)context.getService(serviceRef);
Configuration config = cfgAdmin.getConfiguration("... | [
"private",
"void",
"initWsClient",
"(",
"BundleContext",
"context",
")",
"throws",
"Exception",
"{",
"ServiceReference",
"serviceRef",
"=",
"context",
".",
"getServiceReference",
"(",
"ConfigurationAdmin",
".",
"class",
".",
"getName",
"(",
")",
")",
";",
"Configu... | Inits the ws client.
@param context the context
@throws Exception the exception | [
"Inits",
"the",
"ws",
"client",
"."
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-agent/src/main/java/org/talend/esb/sam/agent/activator/AgentActivator.java#L174-L187 |
160,271 | Talend/tesb-rt-se | sam/sam-agent/src/main/java/org/talend/esb/sam/agent/flowidprocessor/FlowIdProducerOut.java | FlowIdProducerOut.handleResponseOut | protected void handleResponseOut(T message) throws Fault {
Message reqMsg = message.getExchange().getInMessage();
if (reqMsg == null) {
LOG.warning("InMessage is null!");
return;
}
// No flowId for oneway message
Exchange ex = reqMsg.getExchange();
... | java | protected void handleResponseOut(T message) throws Fault {
Message reqMsg = message.getExchange().getInMessage();
if (reqMsg == null) {
LOG.warning("InMessage is null!");
return;
}
// No flowId for oneway message
Exchange ex = reqMsg.getExchange();
... | [
"protected",
"void",
"handleResponseOut",
"(",
"T",
"message",
")",
"throws",
"Fault",
"{",
"Message",
"reqMsg",
"=",
"message",
".",
"getExchange",
"(",
")",
".",
"getInMessage",
"(",
")",
";",
"if",
"(",
"reqMsg",
"==",
"null",
")",
"{",
"LOG",
".",
... | Handling out responce.
@param message
the message
@throws Fault
the fault | [
"Handling",
"out",
"responce",
"."
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-agent/src/main/java/org/talend/esb/sam/agent/flowidprocessor/FlowIdProducerOut.java#L98-L164 |
160,272 | Talend/tesb-rt-se | sam/sam-agent/src/main/java/org/talend/esb/sam/agent/flowidprocessor/FlowIdProducerOut.java | FlowIdProducerOut.handleRequestOut | protected void handleRequestOut(T message) throws Fault {
String flowId = FlowIdHelper.getFlowId(message);
if (flowId == null
&& message.containsKey(PhaseInterceptorChain.PREVIOUS_MESSAGE)) {
// Web Service consumer is acting as an intermediary
@SuppressWarnings("... | java | protected void handleRequestOut(T message) throws Fault {
String flowId = FlowIdHelper.getFlowId(message);
if (flowId == null
&& message.containsKey(PhaseInterceptorChain.PREVIOUS_MESSAGE)) {
// Web Service consumer is acting as an intermediary
@SuppressWarnings("... | [
"protected",
"void",
"handleRequestOut",
"(",
"T",
"message",
")",
"throws",
"Fault",
"{",
"String",
"flowId",
"=",
"FlowIdHelper",
".",
"getFlowId",
"(",
"message",
")",
";",
"if",
"(",
"flowId",
"==",
"null",
"&&",
"message",
".",
"containsKey",
"(",
"Ph... | Handling out request.
@param message
the message
@throws Fault
the fault | [
"Handling",
"out",
"request",
"."
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-agent/src/main/java/org/talend/esb/sam/agent/flowidprocessor/FlowIdProducerOut.java#L174-L198 |
160,273 | Talend/tesb-rt-se | sam/sam-agent/src/main/java/org/talend/esb/sam/agent/flowidprocessor/FlowIdProducerOut.java | FlowIdProducerOut.handleINEvent | protected void handleINEvent(Exchange exchange, String reqFid) throws Fault {
Message inMsg = exchange.getInMessage();
EventProducerInterceptor epi = null;
FlowIdHelper.setFlowId(inMsg, reqFid);
ListIterator<Interceptor<? extends Message>> interceptors = inMsg
.getInter... | java | protected void handleINEvent(Exchange exchange, String reqFid) throws Fault {
Message inMsg = exchange.getInMessage();
EventProducerInterceptor epi = null;
FlowIdHelper.setFlowId(inMsg, reqFid);
ListIterator<Interceptor<? extends Message>> interceptors = inMsg
.getInter... | [
"protected",
"void",
"handleINEvent",
"(",
"Exchange",
"exchange",
",",
"String",
"reqFid",
")",
"throws",
"Fault",
"{",
"Message",
"inMsg",
"=",
"exchange",
".",
"getInMessage",
"(",
")",
";",
"EventProducerInterceptor",
"epi",
"=",
"null",
";",
"FlowIdHelper",... | Calling EventProducerInterceptor in case of logging faults.
@param exchange
the message exchange
@param reqFid
the FlowId
@throws Fault
the fault | [
"Calling",
"EventProducerInterceptor",
"in",
"case",
"of",
"logging",
"faults",
"."
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-agent/src/main/java/org/talend/esb/sam/agent/flowidprocessor/FlowIdProducerOut.java#L211-L228 |
160,274 | Talend/tesb-rt-se | sam/sam-server/src/main/java/org/talend/esb/sam/server/persistence/DBInitializer.java | DBInitializer.setDialect | public void setDialect(String dialect) {
String[] scripts = createScripts.get(dialect);
createSql = scripts[0];
createSqlInd = scripts[1];
} | java | public void setDialect(String dialect) {
String[] scripts = createScripts.get(dialect);
createSql = scripts[0];
createSqlInd = scripts[1];
} | [
"public",
"void",
"setDialect",
"(",
"String",
"dialect",
")",
"{",
"String",
"[",
"]",
"scripts",
"=",
"createScripts",
".",
"get",
"(",
"dialect",
")",
";",
"createSql",
"=",
"scripts",
"[",
"0",
"]",
";",
"createSqlInd",
"=",
"scripts",
"[",
"1",
"]... | Sets the database dialect.
@param dialect
the database dialect | [
"Sets",
"the",
"database",
"dialect",
"."
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-server/src/main/java/org/talend/esb/sam/server/persistence/DBInitializer.java#L63-L67 |
160,275 | Talend/tesb-rt-se | sam/sam-service-soap/src/main/java/org/talend/esb/sam/service/soap/EventTypeMapper.java | EventTypeMapper.map | public static Event map(EventType eventType) {
Event event = new Event();
event.setEventType(mapEventTypeEnum(eventType.getEventType()));
Date date = (eventType.getTimestamp() == null)
? new Date() : eventType.getTimestamp().toGregorianCalendar().getTime();
event.setTimes... | java | public static Event map(EventType eventType) {
Event event = new Event();
event.setEventType(mapEventTypeEnum(eventType.getEventType()));
Date date = (eventType.getTimestamp() == null)
? new Date() : eventType.getTimestamp().toGregorianCalendar().getTime();
event.setTimes... | [
"public",
"static",
"Event",
"map",
"(",
"EventType",
"eventType",
")",
"{",
"Event",
"event",
"=",
"new",
"Event",
"(",
")",
";",
"event",
".",
"setEventType",
"(",
"mapEventTypeEnum",
"(",
"eventType",
".",
"getEventType",
"(",
")",
")",
")",
";",
"Dat... | Map the EventType.
@param eventType the event type
@return the event | [
"Map",
"the",
"EventType",
"."
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-service-soap/src/main/java/org/talend/esb/sam/service/soap/EventTypeMapper.java#L58-L72 |
160,276 | Talend/tesb-rt-se | sam/sam-service-soap/src/main/java/org/talend/esb/sam/service/soap/EventTypeMapper.java | EventTypeMapper.mapCustomInfo | private static Map<String, String> mapCustomInfo(CustomInfoType ciType){
Map<String, String> customInfo = new HashMap<String, String>();
if (ciType != null){
for (CustomInfoType.Item item : ciType.getItem()) {
customInfo.put(item.getKey(), item.getValue());
}
... | java | private static Map<String, String> mapCustomInfo(CustomInfoType ciType){
Map<String, String> customInfo = new HashMap<String, String>();
if (ciType != null){
for (CustomInfoType.Item item : ciType.getItem()) {
customInfo.put(item.getKey(), item.getValue());
}
... | [
"private",
"static",
"Map",
"<",
"String",
",",
"String",
">",
"mapCustomInfo",
"(",
"CustomInfoType",
"ciType",
")",
"{",
"Map",
"<",
"String",
",",
"String",
">",
"customInfo",
"=",
"new",
"HashMap",
"<",
"String",
",",
"String",
">",
"(",
")",
";",
... | Map custom info.
@param ciType the custom info type
@return the map | [
"Map",
"custom",
"info",
"."
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-service-soap/src/main/java/org/talend/esb/sam/service/soap/EventTypeMapper.java#L80-L88 |
160,277 | Talend/tesb-rt-se | sam/sam-service-soap/src/main/java/org/talend/esb/sam/service/soap/EventTypeMapper.java | EventTypeMapper.mapContent | private static String mapContent(DataHandler dh) {
if (dh == null) {
return "";
}
try {
InputStream is = dh.getInputStream();
String content = IOUtils.toString(is);
is.close();
return content;
} catch (IOException e) {
... | java | private static String mapContent(DataHandler dh) {
if (dh == null) {
return "";
}
try {
InputStream is = dh.getInputStream();
String content = IOUtils.toString(is);
is.close();
return content;
} catch (IOException e) {
... | [
"private",
"static",
"String",
"mapContent",
"(",
"DataHandler",
"dh",
")",
"{",
"if",
"(",
"dh",
"==",
"null",
")",
"{",
"return",
"\"\"",
";",
"}",
"try",
"{",
"InputStream",
"is",
"=",
"dh",
".",
"getInputStream",
"(",
")",
";",
"String",
"content",... | Map content.
@param dh the data handler
@return the string | [
"Map",
"content",
"."
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-service-soap/src/main/java/org/talend/esb/sam/service/soap/EventTypeMapper.java#L96-L108 |
160,278 | Talend/tesb-rt-se | sam/sam-service-soap/src/main/java/org/talend/esb/sam/service/soap/EventTypeMapper.java | EventTypeMapper.mapMessageInfo | private static MessageInfo mapMessageInfo(MessageInfoType messageInfoType) {
MessageInfo messageInfo = new MessageInfo();
if (messageInfoType != null) {
messageInfo.setFlowId(messageInfoType.getFlowId());
messageInfo.setMessageId(messageInfoType.getMessageId());
messa... | java | private static MessageInfo mapMessageInfo(MessageInfoType messageInfoType) {
MessageInfo messageInfo = new MessageInfo();
if (messageInfoType != null) {
messageInfo.setFlowId(messageInfoType.getFlowId());
messageInfo.setMessageId(messageInfoType.getMessageId());
messa... | [
"private",
"static",
"MessageInfo",
"mapMessageInfo",
"(",
"MessageInfoType",
"messageInfoType",
")",
"{",
"MessageInfo",
"messageInfo",
"=",
"new",
"MessageInfo",
"(",
")",
";",
"if",
"(",
"messageInfoType",
"!=",
"null",
")",
"{",
"messageInfo",
".",
"setFlowId"... | Map message info.
@param messageInfoType the message info type
@return the message info | [
"Map",
"message",
"info",
"."
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-service-soap/src/main/java/org/talend/esb/sam/service/soap/EventTypeMapper.java#L116-L127 |
160,279 | Talend/tesb-rt-se | sam/sam-service-soap/src/main/java/org/talend/esb/sam/service/soap/EventTypeMapper.java | EventTypeMapper.mapOriginatorType | private static Originator mapOriginatorType(OriginatorType originatorType) {
Originator originator = new Originator();
if (originatorType != null) {
originator.setCustomId(originatorType.getCustomId());
originator.setHostname(originatorType.getHostname());
originator.... | java | private static Originator mapOriginatorType(OriginatorType originatorType) {
Originator originator = new Originator();
if (originatorType != null) {
originator.setCustomId(originatorType.getCustomId());
originator.setHostname(originatorType.getHostname());
originator.... | [
"private",
"static",
"Originator",
"mapOriginatorType",
"(",
"OriginatorType",
"originatorType",
")",
"{",
"Originator",
"originator",
"=",
"new",
"Originator",
"(",
")",
";",
"if",
"(",
"originatorType",
"!=",
"null",
")",
"{",
"originator",
".",
"setCustomId",
... | Map originator type.
@param originatorType the originator type
@return the originator | [
"Map",
"originator",
"type",
"."
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-service-soap/src/main/java/org/talend/esb/sam/service/soap/EventTypeMapper.java#L135-L145 |
160,280 | Talend/tesb-rt-se | sam/sam-service-soap/src/main/java/org/talend/esb/sam/service/soap/EventTypeMapper.java | EventTypeMapper.mapEventTypeEnum | private static EventTypeEnum mapEventTypeEnum(EventEnumType eventType) {
if (eventType != null) {
return EventTypeEnum.valueOf(eventType.name());
}
return EventTypeEnum.UNKNOWN;
} | java | private static EventTypeEnum mapEventTypeEnum(EventEnumType eventType) {
if (eventType != null) {
return EventTypeEnum.valueOf(eventType.name());
}
return EventTypeEnum.UNKNOWN;
} | [
"private",
"static",
"EventTypeEnum",
"mapEventTypeEnum",
"(",
"EventEnumType",
"eventType",
")",
"{",
"if",
"(",
"eventType",
"!=",
"null",
")",
"{",
"return",
"EventTypeEnum",
".",
"valueOf",
"(",
"eventType",
".",
"name",
"(",
")",
")",
";",
"}",
"return"... | Map event type enum.
@param eventType the event type
@return the event type enum | [
"Map",
"event",
"type",
"enum",
"."
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-service-soap/src/main/java/org/talend/esb/sam/service/soap/EventTypeMapper.java#L153-L158 |
160,281 | Talend/tesb-rt-se | examples/cxf/jaxrs-jaxws-transformations/client/src/main/java/client/SOAPClient.java | SOAPClient.useNewSOAPService | public void useNewSOAPService(boolean direct) throws Exception {
URL wsdlURL = getClass().getResource("/CustomerServiceNew.wsdl");
org.customer.service.CustomerServiceService service =
new org.customer.service.CustomerServiceService(wsdlURL);
org.customer.service.CustomerSe... | java | public void useNewSOAPService(boolean direct) throws Exception {
URL wsdlURL = getClass().getResource("/CustomerServiceNew.wsdl");
org.customer.service.CustomerServiceService service =
new org.customer.service.CustomerServiceService(wsdlURL);
org.customer.service.CustomerSe... | [
"public",
"void",
"useNewSOAPService",
"(",
"boolean",
"direct",
")",
"throws",
"Exception",
"{",
"URL",
"wsdlURL",
"=",
"getClass",
"(",
")",
".",
"getResource",
"(",
"\"/CustomerServiceNew.wsdl\"",
")",
";",
"org",
".",
"customer",
".",
"service",
".",
"Cust... | New SOAP client uses new SOAP service. | [
"New",
"SOAP",
"client",
"uses",
"new",
"SOAP",
"service",
"."
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/examples/cxf/jaxrs-jaxws-transformations/client/src/main/java/client/SOAPClient.java#L72-L86 |
160,282 | Talend/tesb-rt-se | examples/cxf/jaxrs-jaxws-transformations/client/src/main/java/client/SOAPClient.java | SOAPClient.useNewSOAPServiceWithOldClient | public void useNewSOAPServiceWithOldClient() throws Exception {
URL wsdlURL = getClass().getResource("/CustomerServiceNew.wsdl");
com.example.customerservice.CustomerServiceService service =
new com.example.customerservice.CustomerServiceService(wsdlURL);
com.examp... | java | public void useNewSOAPServiceWithOldClient() throws Exception {
URL wsdlURL = getClass().getResource("/CustomerServiceNew.wsdl");
com.example.customerservice.CustomerServiceService service =
new com.example.customerservice.CustomerServiceService(wsdlURL);
com.examp... | [
"public",
"void",
"useNewSOAPServiceWithOldClient",
"(",
")",
"throws",
"Exception",
"{",
"URL",
"wsdlURL",
"=",
"getClass",
"(",
")",
".",
"getResource",
"(",
"\"/CustomerServiceNew.wsdl\"",
")",
";",
"com",
".",
"example",
".",
"customerservice",
".",
"CustomerS... | Old SOAP client uses new SOAP service | [
"Old",
"SOAP",
"client",
"uses",
"new",
"SOAP",
"service"
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/examples/cxf/jaxrs-jaxws-transformations/client/src/main/java/client/SOAPClient.java#L91-L114 |
160,283 | Talend/tesb-rt-se | examples/cxf/jaxrs-jaxws-transformations/client/src/main/java/client/SOAPClient.java | SOAPClient.useNewSOAPServiceWithOldClientAndRedirection | public void useNewSOAPServiceWithOldClientAndRedirection() throws Exception {
URL wsdlURL = getClass().getResource("/CustomerService.wsdl");
com.example.customerservice.CustomerServiceService service =
new com.example.customerservice.CustomerServiceService(wsdlURL);
com.exa... | java | public void useNewSOAPServiceWithOldClientAndRedirection() throws Exception {
URL wsdlURL = getClass().getResource("/CustomerService.wsdl");
com.example.customerservice.CustomerServiceService service =
new com.example.customerservice.CustomerServiceService(wsdlURL);
com.exa... | [
"public",
"void",
"useNewSOAPServiceWithOldClientAndRedirection",
"(",
")",
"throws",
"Exception",
"{",
"URL",
"wsdlURL",
"=",
"getClass",
"(",
")",
".",
"getResource",
"(",
"\"/CustomerService.wsdl\"",
")",
";",
"com",
".",
"example",
".",
"customerservice",
".",
... | Old SOAP client uses new SOAP service with the
redirection to the new endpoint and transformation
on the server side | [
"Old",
"SOAP",
"client",
"uses",
"new",
"SOAP",
"service",
"with",
"the",
"redirection",
"to",
"the",
"new",
"endpoint",
"and",
"transformation",
"on",
"the",
"server",
"side"
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/examples/cxf/jaxrs-jaxws-transformations/client/src/main/java/client/SOAPClient.java#L146-L160 |
160,284 | Talend/tesb-rt-se | examples/cxf/jaxrs-jaxws-transformations/client/src/main/java/client/SOAPClient.java | SOAPClient.addTransformInterceptors | private void addTransformInterceptors(List<Interceptor<?>> inInterceptors,
List<Interceptor<?>> outInterceptors,
boolean newClient) {
// The old service expects the Customer data be qualified with
// the 'http:/... | java | private void addTransformInterceptors(List<Interceptor<?>> inInterceptors,
List<Interceptor<?>> outInterceptors,
boolean newClient) {
// The old service expects the Customer data be qualified with
// the 'http:/... | [
"private",
"void",
"addTransformInterceptors",
"(",
"List",
"<",
"Interceptor",
"<",
"?",
">",
">",
"inInterceptors",
",",
"List",
"<",
"Interceptor",
"<",
"?",
">",
">",
"outInterceptors",
",",
"boolean",
"newClient",
")",
"{",
"// The old service expects the Cus... | Prepares transformation interceptors for a client.
@param clientConfig the client configuration
@param newClient indicates if it is a new/updated client | [
"Prepares",
"transformation",
"interceptors",
"for",
"a",
"client",
"."
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/examples/cxf/jaxrs-jaxws-transformations/client/src/main/java/client/SOAPClient.java#L169-L223 |
160,285 | Talend/tesb-rt-se | examples/cxf/jaxrs-advanced/common/src/main/java/common/advanced/Person.java | Person.getXmlID | @SuppressWarnings("unused")
@XmlID
@XmlAttribute(name = "id")
private String getXmlID(){
return String.format("%s-%s", this.getClass().getSimpleName(), Long.valueOf(id));
} | java | @SuppressWarnings("unused")
@XmlID
@XmlAttribute(name = "id")
private String getXmlID(){
return String.format("%s-%s", this.getClass().getSimpleName(), Long.valueOf(id));
} | [
"@",
"SuppressWarnings",
"(",
"\"unused\"",
")",
"@",
"XmlID",
"@",
"XmlAttribute",
"(",
"name",
"=",
"\"id\"",
")",
"private",
"String",
"getXmlID",
"(",
")",
"{",
"return",
"String",
".",
"format",
"(",
"\"%s-%s\"",
",",
"this",
".",
"getClass",
"(",
"... | to do with XmlId value being strictly of type 'String' | [
"to",
"do",
"with",
"XmlId",
"value",
"being",
"strictly",
"of",
"type",
"String"
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/examples/cxf/jaxrs-advanced/common/src/main/java/common/advanced/Person.java#L212-L217 |
160,286 | Talend/tesb-rt-se | locator/src/main/java/org/talend/esb/servicelocator/cxf/internal/LocatorLifecycleStrategy.java | LocatorLifecycleStrategy.stopAllServersAndRemoveCamelContext | private void stopAllServersAndRemoveCamelContext(CamelContext camelContext) {
log.debug("Stopping all servers associated with {}", camelContext);
List<SingleBusLocatorRegistrar> registrars = locatorRegistrar.getAllRegistars(camelContext);
registrars.forEach(registrar -> registrar.stopAllServersA... | java | private void stopAllServersAndRemoveCamelContext(CamelContext camelContext) {
log.debug("Stopping all servers associated with {}", camelContext);
List<SingleBusLocatorRegistrar> registrars = locatorRegistrar.getAllRegistars(camelContext);
registrars.forEach(registrar -> registrar.stopAllServersA... | [
"private",
"void",
"stopAllServersAndRemoveCamelContext",
"(",
"CamelContext",
"camelContext",
")",
"{",
"log",
".",
"debug",
"(",
"\"Stopping all servers associated with {}\"",
",",
"camelContext",
")",
";",
"List",
"<",
"SingleBusLocatorRegistrar",
">",
"registrars",
"=... | Stops all servers linked with the current camel context
@param camelContext | [
"Stops",
"all",
"servers",
"linked",
"with",
"the",
"current",
"camel",
"context"
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/locator/src/main/java/org/talend/esb/servicelocator/cxf/internal/LocatorLifecycleStrategy.java#L76-L80 |
160,287 | Talend/tesb-rt-se | sam/sam-agent/src/main/java/org/talend/esb/sam/agent/serviceclient/EventMapper.java | EventMapper.map | public static EventType map(Event event) {
EventType eventType = new EventType();
eventType.setTimestamp(Converter.convertDate(event.getTimestamp()));
eventType.setEventType(convertEventType(event.getEventType()));
OriginatorType origType = mapOriginator(event.getOriginator());
e... | java | public static EventType map(Event event) {
EventType eventType = new EventType();
eventType.setTimestamp(Converter.convertDate(event.getTimestamp()));
eventType.setEventType(convertEventType(event.getEventType()));
OriginatorType origType = mapOriginator(event.getOriginator());
e... | [
"public",
"static",
"EventType",
"map",
"(",
"Event",
"event",
")",
"{",
"EventType",
"eventType",
"=",
"new",
"EventType",
"(",
")",
";",
"eventType",
".",
"setTimestamp",
"(",
"Converter",
".",
"convertDate",
"(",
"event",
".",
"getTimestamp",
"(",
")",
... | convert Event bean to EventType manually.
@param event the event
@return the event type | [
"convert",
"Event",
"bean",
"to",
"EventType",
"manually",
"."
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-agent/src/main/java/org/talend/esb/sam/agent/serviceclient/EventMapper.java#L57-L72 |
160,288 | Talend/tesb-rt-se | sam/sam-agent/src/main/java/org/talend/esb/sam/agent/serviceclient/EventMapper.java | EventMapper.getDataHandlerForString | private static DataHandler getDataHandlerForString(Event event) {
try {
return new DataHandler(new ByteDataSource(event.getContent().getBytes("UTF-8")));
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
} | java | private static DataHandler getDataHandlerForString(Event event) {
try {
return new DataHandler(new ByteDataSource(event.getContent().getBytes("UTF-8")));
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
} | [
"private",
"static",
"DataHandler",
"getDataHandlerForString",
"(",
"Event",
"event",
")",
"{",
"try",
"{",
"return",
"new",
"DataHandler",
"(",
"new",
"ByteDataSource",
"(",
"event",
".",
"getContent",
"(",
")",
".",
"getBytes",
"(",
"\"UTF-8\"",
")",
")",
... | Gets the data handler from event.
@param event the event
@return the data handler | [
"Gets",
"the",
"data",
"handler",
"from",
"event",
"."
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-agent/src/main/java/org/talend/esb/sam/agent/serviceclient/EventMapper.java#L80-L86 |
160,289 | Talend/tesb-rt-se | sam/sam-agent/src/main/java/org/talend/esb/sam/agent/serviceclient/EventMapper.java | EventMapper.mapMessageInfo | private static MessageInfoType mapMessageInfo(MessageInfo messageInfo) {
if (messageInfo == null) {
return null;
}
MessageInfoType miType = new MessageInfoType();
miType.setMessageId(messageInfo.getMessageId());
miType.setFlowId(messageInfo.getFlowId());
miTyp... | java | private static MessageInfoType mapMessageInfo(MessageInfo messageInfo) {
if (messageInfo == null) {
return null;
}
MessageInfoType miType = new MessageInfoType();
miType.setMessageId(messageInfo.getMessageId());
miType.setFlowId(messageInfo.getFlowId());
miTyp... | [
"private",
"static",
"MessageInfoType",
"mapMessageInfo",
"(",
"MessageInfo",
"messageInfo",
")",
"{",
"if",
"(",
"messageInfo",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"MessageInfoType",
"miType",
"=",
"new",
"MessageInfoType",
"(",
")",
";",
"miT... | Mapping message info.
@param messageInfo the message info
@return the message info type | [
"Mapping",
"message",
"info",
"."
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-agent/src/main/java/org/talend/esb/sam/agent/serviceclient/EventMapper.java#L94-L105 |
160,290 | Talend/tesb-rt-se | sam/sam-agent/src/main/java/org/talend/esb/sam/agent/serviceclient/EventMapper.java | EventMapper.mapOriginator | private static OriginatorType mapOriginator(Originator originator) {
if (originator == null) {
return null;
}
OriginatorType origType = new OriginatorType();
origType.setProcessId(originator.getProcessId());
origType.setIp(originator.getIp());
origType.setHost... | java | private static OriginatorType mapOriginator(Originator originator) {
if (originator == null) {
return null;
}
OriginatorType origType = new OriginatorType();
origType.setProcessId(originator.getProcessId());
origType.setIp(originator.getIp());
origType.setHost... | [
"private",
"static",
"OriginatorType",
"mapOriginator",
"(",
"Originator",
"originator",
")",
"{",
"if",
"(",
"originator",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"OriginatorType",
"origType",
"=",
"new",
"OriginatorType",
"(",
")",
";",
"origType... | Mapping originator.
@param originator the originator
@return the originator type | [
"Mapping",
"originator",
"."
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-agent/src/main/java/org/talend/esb/sam/agent/serviceclient/EventMapper.java#L113-L124 |
160,291 | Talend/tesb-rt-se | sam/sam-agent/src/main/java/org/talend/esb/sam/agent/serviceclient/EventMapper.java | EventMapper.convertCustomInfo | private static CustomInfoType convertCustomInfo(Map<String, String> customInfo) {
if (customInfo == null) {
return null;
}
CustomInfoType ciType = new CustomInfoType();
for (Entry<String, String> entry : customInfo.entrySet()) {
CustomInfoType.Item cItem = new Cu... | java | private static CustomInfoType convertCustomInfo(Map<String, String> customInfo) {
if (customInfo == null) {
return null;
}
CustomInfoType ciType = new CustomInfoType();
for (Entry<String, String> entry : customInfo.entrySet()) {
CustomInfoType.Item cItem = new Cu... | [
"private",
"static",
"CustomInfoType",
"convertCustomInfo",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"customInfo",
")",
"{",
"if",
"(",
"customInfo",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"CustomInfoType",
"ciType",
"=",
"new",
"CustomInf... | Convert custom info.
@param customInfo the custom info map
@return the custom info type | [
"Convert",
"custom",
"info",
"."
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-agent/src/main/java/org/talend/esb/sam/agent/serviceclient/EventMapper.java#L132-L146 |
160,292 | Talend/tesb-rt-se | sam/sam-agent/src/main/java/org/talend/esb/sam/agent/serviceclient/EventMapper.java | EventMapper.convertEventType | private static EventEnumType convertEventType(org.talend.esb.sam.common.event.EventTypeEnum eventType) {
if (eventType == null) {
return null;
}
return EventEnumType.valueOf(eventType.name());
} | java | private static EventEnumType convertEventType(org.talend.esb.sam.common.event.EventTypeEnum eventType) {
if (eventType == null) {
return null;
}
return EventEnumType.valueOf(eventType.name());
} | [
"private",
"static",
"EventEnumType",
"convertEventType",
"(",
"org",
".",
"talend",
".",
"esb",
".",
"sam",
".",
"common",
".",
"event",
".",
"EventTypeEnum",
"eventType",
")",
"{",
"if",
"(",
"eventType",
"==",
"null",
")",
"{",
"return",
"null",
";",
... | Convert event type.
@param eventType the event type
@return the event enum type | [
"Convert",
"event",
"type",
"."
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-agent/src/main/java/org/talend/esb/sam/agent/serviceclient/EventMapper.java#L154-L159 |
160,293 | Talend/tesb-rt-se | sam/sam-agent/src/main/java/org/talend/esb/sam/agent/serviceclient/EventMapper.java | EventMapper.convertString | private static QName convertString(String str) {
if (str != null) {
return QName.valueOf(str);
} else {
return null;
}
} | java | private static QName convertString(String str) {
if (str != null) {
return QName.valueOf(str);
} else {
return null;
}
} | [
"private",
"static",
"QName",
"convertString",
"(",
"String",
"str",
")",
"{",
"if",
"(",
"str",
"!=",
"null",
")",
"{",
"return",
"QName",
".",
"valueOf",
"(",
"str",
")",
";",
"}",
"else",
"{",
"return",
"null",
";",
"}",
"}"
] | Convert string to qname.
@param str the string
@return the qname | [
"Convert",
"string",
"to",
"qname",
"."
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-agent/src/main/java/org/talend/esb/sam/agent/serviceclient/EventMapper.java#L167-L173 |
160,294 | Talend/tesb-rt-se | sam/sam-common/src/main/java/org/talend/esb/sam/common/event/MonitoringException.java | MonitoringException.logException | public void logException(Level level) {
if (!LOG.isLoggable(level)) {
return;
}
final StringBuilder builder = new StringBuilder();
builder.append("\n----------------------------------------------------");
builder.append("\nMonitoringException");
builder.append... | java | public void logException(Level level) {
if (!LOG.isLoggable(level)) {
return;
}
final StringBuilder builder = new StringBuilder();
builder.append("\n----------------------------------------------------");
builder.append("\nMonitoringException");
builder.append... | [
"public",
"void",
"logException",
"(",
"Level",
"level",
")",
"{",
"if",
"(",
"!",
"LOG",
".",
"isLoggable",
"(",
"level",
")",
")",
"{",
"return",
";",
"}",
"final",
"StringBuilder",
"builder",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"builder",
".... | Prints the error message as log message.
@param level the log level | [
"Prints",
"the",
"error",
"message",
"as",
"log",
"message",
"."
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-common/src/main/java/org/talend/esb/sam/common/event/MonitoringException.java#L103-L128 |
160,295 | Talend/tesb-rt-se | locator/src/main/java/org/talend/esb/servicelocator/cxf/internal/LocatorClientEnabler.java | LocatorClientEnabler.getLocatorSelectionStrategy | private LocatorSelectionStrategy getLocatorSelectionStrategy(String locatorSelectionStrategy) {
if (null == locatorSelectionStrategy) {
return locatorSelectionStrategyMap.get(DEFAULT_STRATEGY).getInstance();
}
if (LOG.isLoggable(Level.FINE)) {
LOG.log(Level.FINE, "Strate... | java | private LocatorSelectionStrategy getLocatorSelectionStrategy(String locatorSelectionStrategy) {
if (null == locatorSelectionStrategy) {
return locatorSelectionStrategyMap.get(DEFAULT_STRATEGY).getInstance();
}
if (LOG.isLoggable(Level.FINE)) {
LOG.log(Level.FINE, "Strate... | [
"private",
"LocatorSelectionStrategy",
"getLocatorSelectionStrategy",
"(",
"String",
"locatorSelectionStrategy",
")",
"{",
"if",
"(",
"null",
"==",
"locatorSelectionStrategy",
")",
"{",
"return",
"locatorSelectionStrategyMap",
".",
"get",
"(",
"DEFAULT_STRATEGY",
")",
"."... | If the String argument locatorSelectionStrategy is as key in the map representing the locatorSelectionStrategies, the
corresponding strategy is selected, else it remains unchanged.
@param locatorSelectionStrategy | [
"If",
"the",
"String",
"argument",
"locatorSelectionStrategy",
"is",
"as",
"key",
"in",
"the",
"map",
"representing",
"the",
"locatorSelectionStrategies",
"the",
"corresponding",
"strategy",
"is",
"selected",
"else",
"it",
"remains",
"unchanged",
"."
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/locator/src/main/java/org/talend/esb/servicelocator/cxf/internal/LocatorClientEnabler.java#L71-L90 |
160,296 | Talend/tesb-rt-se | locator/src/main/java/org/talend/esb/servicelocator/cxf/internal/LocatorClientEnabler.java | LocatorClientEnabler.setDefaultLocatorSelectionStrategy | @Value("${locator.strategy}")
public void setDefaultLocatorSelectionStrategy(String defaultLocatorSelectionStrategy) {
this.defaultLocatorSelectionStrategy = defaultLocatorSelectionStrategy;
if (LOG.isLoggable(Level.FINE)) {
LOG.log(Level.FINE, "Default strategy " + defaultLocatorSelecti... | java | @Value("${locator.strategy}")
public void setDefaultLocatorSelectionStrategy(String defaultLocatorSelectionStrategy) {
this.defaultLocatorSelectionStrategy = defaultLocatorSelectionStrategy;
if (LOG.isLoggable(Level.FINE)) {
LOG.log(Level.FINE, "Default strategy " + defaultLocatorSelecti... | [
"@",
"Value",
"(",
"\"${locator.strategy}\"",
")",
"public",
"void",
"setDefaultLocatorSelectionStrategy",
"(",
"String",
"defaultLocatorSelectionStrategy",
")",
"{",
"this",
".",
"defaultLocatorSelectionStrategy",
"=",
"defaultLocatorSelectionStrategy",
";",
"if",
"(",
"LO... | If the String argument defaultLocatorSelectionStrategy is as key in the map representing the locatorSelectionStrategies, the
corresponding strategy is selected and set as default strategy, else both the selected strategy and the default strategy remain
unchanged.
@param defaultLocatorSelectionStrategy | [
"If",
"the",
"String",
"argument",
"defaultLocatorSelectionStrategy",
"is",
"as",
"key",
"in",
"the",
"map",
"representing",
"the",
"locatorSelectionStrategies",
"the",
"corresponding",
"strategy",
"is",
"selected",
"and",
"set",
"as",
"default",
"strategy",
"else",
... | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/locator/src/main/java/org/talend/esb/servicelocator/cxf/internal/LocatorClientEnabler.java#L98-L105 |
160,297 | Talend/tesb-rt-se | locator/src/main/java/org/talend/esb/servicelocator/cxf/internal/LocatorClientEnabler.java | LocatorClientEnabler.enable | public void enable(ConduitSelectorHolder conduitSelectorHolder, SLPropertiesMatcher matcher,
String selectionStrategy) {
LocatorTargetSelector selector = new LocatorTargetSelector();
selector.setEndpoint(conduitSelectorHolder.getConduitSelector().getEndpoint());
String actualStrateg... | java | public void enable(ConduitSelectorHolder conduitSelectorHolder, SLPropertiesMatcher matcher,
String selectionStrategy) {
LocatorTargetSelector selector = new LocatorTargetSelector();
selector.setEndpoint(conduitSelectorHolder.getConduitSelector().getEndpoint());
String actualStrateg... | [
"public",
"void",
"enable",
"(",
"ConduitSelectorHolder",
"conduitSelectorHolder",
",",
"SLPropertiesMatcher",
"matcher",
",",
"String",
"selectionStrategy",
")",
"{",
"LocatorTargetSelector",
"selector",
"=",
"new",
"LocatorTargetSelector",
"(",
")",
";",
"selector",
"... | The selectionStrategy given as String argument is selected as locatorSelectionStrategy.
If selectionStrategy is null, the defaultLocatorSelectionStrategy is used instead.
Then the new locatorSelectionStrategy is connected to the locatorClient and the matcher.
A new LocatorTargetSelector is created, set to the locatorSe... | [
"The",
"selectionStrategy",
"given",
"as",
"String",
"argument",
"is",
"selected",
"as",
"locatorSelectionStrategy",
".",
"If",
"selectionStrategy",
"is",
"null",
"the",
"defaultLocatorSelectionStrategy",
"is",
"used",
"instead",
".",
"Then",
"the",
"new",
"locatorSel... | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/locator/src/main/java/org/talend/esb/servicelocator/cxf/internal/LocatorClientEnabler.java#L126-L150 |
160,298 | Talend/tesb-rt-se | request-callback/src/main/java/org/talend/esb/mep/requestcallback/feature/RequestCallbackFeature.java | RequestCallbackFeature.applyWsdlExtensions | public static void applyWsdlExtensions(Bus bus) {
ExtensionRegistry registry = bus.getExtension(WSDLManager.class).getExtensionRegistry();
try {
JAXBExtensionHelper.addExtensions(registry,
javax.wsdl.Definition.class,
org.talend.esb.mep.requestcallb... | java | public static void applyWsdlExtensions(Bus bus) {
ExtensionRegistry registry = bus.getExtension(WSDLManager.class).getExtensionRegistry();
try {
JAXBExtensionHelper.addExtensions(registry,
javax.wsdl.Definition.class,
org.talend.esb.mep.requestcallb... | [
"public",
"static",
"void",
"applyWsdlExtensions",
"(",
"Bus",
"bus",
")",
"{",
"ExtensionRegistry",
"registry",
"=",
"bus",
".",
"getExtension",
"(",
"WSDLManager",
".",
"class",
")",
".",
"getExtensionRegistry",
"(",
")",
";",
"try",
"{",
"JAXBExtensionHelper"... | Adds JAXB WSDL extensions to allow work with custom
WSDL elements such as \"partner-link\"
@param bus CXF bus | [
"Adds",
"JAXB",
"WSDL",
"extensions",
"to",
"allow",
"work",
"with",
"custom",
"WSDL",
"elements",
"such",
"as",
"\\",
"partner",
"-",
"link",
"\\"
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/request-callback/src/main/java/org/talend/esb/mep/requestcallback/feature/RequestCallbackFeature.java#L84-L101 |
160,299 | Talend/tesb-rt-se | sam/sam-agent/src/main/java/org/talend/esb/sam/agent/feature/EventFeatureImpl.java | EventFeatureImpl.setQueue | @Inject
public void setQueue(EventQueue queue) {
if (epi == null) {
MessageToEventMapper mapper = new MessageToEventMapper();
mapper.setMaxContentLength(maxContentLength);
epi = new EventProducerInterceptor(mapper, queue);
}
} | java | @Inject
public void setQueue(EventQueue queue) {
if (epi == null) {
MessageToEventMapper mapper = new MessageToEventMapper();
mapper.setMaxContentLength(maxContentLength);
epi = new EventProducerInterceptor(mapper, queue);
}
} | [
"@",
"Inject",
"public",
"void",
"setQueue",
"(",
"EventQueue",
"queue",
")",
"{",
"if",
"(",
"epi",
"==",
"null",
")",
"{",
"MessageToEventMapper",
"mapper",
"=",
"new",
"MessageToEventMapper",
"(",
")",
";",
"mapper",
".",
"setMaxContentLength",
"(",
"maxC... | Sets the queue.
@param queue the new queue | [
"Sets",
"the",
"queue",
"."
] | 0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886 | https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-agent/src/main/java/org/talend/esb/sam/agent/feature/EventFeatureImpl.java#L164-L172 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.