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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
23,600 | banq/jdonframework | JdonAccessory/jdon-jdbc/src/main/java/com/jdon/model/query/PageIteratorSolver.java | PageIteratorSolver.getDatas | public PageIterator getDatas(String queryParam, String sqlqueryAllCount, String sqlquery, int start, int count) {
if (UtilValidate.isEmpty(sqlqueryAllCount)) {
Debug.logError(" the parameter sqlqueryAllCount is null", module);
return new PageIterator();
}
if (UtilValidate.isEmpty(sqlquery)) {
Debug... | java | public PageIterator getDatas(String queryParam, String sqlqueryAllCount, String sqlquery, int start, int count) {
if (UtilValidate.isEmpty(sqlqueryAllCount)) {
Debug.logError(" the parameter sqlqueryAllCount is null", module);
return new PageIterator();
}
if (UtilValidate.isEmpty(sqlquery)) {
Debug... | [
"public",
"PageIterator",
"getDatas",
"(",
"String",
"queryParam",
",",
"String",
"sqlqueryAllCount",
",",
"String",
"sqlquery",
",",
"int",
"start",
",",
"int",
"count",
")",
"{",
"if",
"(",
"UtilValidate",
".",
"isEmpty",
"(",
"sqlqueryAllCount",
")",
")",
... | create a PageIterator instance
@param queryParam
the value of sqlquery's "?"
@param sqlqueryAllCount
the sql for query all count that fit for condition
@param sqlquery
the sql for query that fit for condtion, return id collection
@param start
@param count
@return PageIterator
@throws java.lang.Exception | [
"create",
"a",
"PageIterator",
"instance"
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-jdbc/src/main/java/com/jdon/model/query/PageIteratorSolver.java#L168-L183 |
23,601 | banq/jdonframework | JdonAccessory/jdon-jdbc/src/main/java/com/jdon/model/query/PageIteratorSolver.java | PageIteratorSolver.getPageIterator | public PageIterator getPageIterator(String sqlqueryAllCount, String sqlquery, String queryParam, int start, int count) {
if (UtilValidate.isEmpty(sqlqueryAllCount)) {
Debug.logError(" the parameter sqlqueryAllCount is null", module);
return new PageIterator();
}
if (UtilValidate.isEmpty(sqlquery)) {
... | java | public PageIterator getPageIterator(String sqlqueryAllCount, String sqlquery, String queryParam, int start, int count) {
if (UtilValidate.isEmpty(sqlqueryAllCount)) {
Debug.logError(" the parameter sqlqueryAllCount is null", module);
return new PageIterator();
}
if (UtilValidate.isEmpty(sqlquery)) {
... | [
"public",
"PageIterator",
"getPageIterator",
"(",
"String",
"sqlqueryAllCount",
",",
"String",
"sqlquery",
",",
"String",
"queryParam",
",",
"int",
"start",
",",
"int",
"count",
")",
"{",
"if",
"(",
"UtilValidate",
".",
"isEmpty",
"(",
"sqlqueryAllCount",
")",
... | same as getDatas the parameters sort is different from the getDatas
method
@param sqlqueryAllCount
the sql sentence for "select count(1) .."
@param sqlquery
the sql sentence for "select id from xxxx";
@param queryParam
the parameter of String type for the sqlquery.
@param start
the starting number of a page in allCoun... | [
"same",
"as",
"getDatas",
"the",
"parameters",
"sort",
"is",
"different",
"from",
"the",
"getDatas",
"method"
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-jdbc/src/main/java/com/jdon/model/query/PageIteratorSolver.java#L201-L211 |
23,602 | banq/jdonframework | JdonAccessory/jdon-jdbc/src/main/java/com/jdon/model/query/PageIteratorSolver.java | PageIteratorSolver.getPageIterator | public PageIterator getPageIterator(String sqlqueryAllCount, String sqlquery, Collection queryParams, int startIndex, int count) {
Debug.logVerbose("[JdonFramework]enter getPageIterator .. start= " + startIndex + " count=" + count, module);
if (queryParams == null) {
Debug.logError(" the parameters collection... | java | public PageIterator getPageIterator(String sqlqueryAllCount, String sqlquery, Collection queryParams, int startIndex, int count) {
Debug.logVerbose("[JdonFramework]enter getPageIterator .. start= " + startIndex + " count=" + count, module);
if (queryParams == null) {
Debug.logError(" the parameters collection... | [
"public",
"PageIterator",
"getPageIterator",
"(",
"String",
"sqlqueryAllCount",
",",
"String",
"sqlquery",
",",
"Collection",
"queryParams",
",",
"int",
"startIndex",
",",
"int",
"count",
")",
"{",
"Debug",
".",
"logVerbose",
"(",
"\"[JdonFramework]enter getPageIterat... | get a PageIterator
@param sqlqueryAllCount
the sql sentence for "select count(1) .."
@param sqlquery
the sql sentence for "select id from xxxx";
@param queryParams
the parameter collection for the sqlquery.
@param start
the starting number of a page in allCount;
@param count
the display number of a page
@return | [
"get",
"a",
"PageIterator"
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-jdbc/src/main/java/com/jdon/model/query/PageIteratorSolver.java#L228-L252 |
23,603 | banq/jdonframework | JdonAccessory/jdon-jdbc/src/main/java/com/jdon/model/query/PageIteratorSolver.java | PageIteratorSolver.locate | public Block locate(String sqlquery, Collection queryParams, Object locateId) {
return blockStrategy.locate(sqlquery, queryParams, locateId);
} | java | public Block locate(String sqlquery, Collection queryParams, Object locateId) {
return blockStrategy.locate(sqlquery, queryParams, locateId);
} | [
"public",
"Block",
"locate",
"(",
"String",
"sqlquery",
",",
"Collection",
"queryParams",
",",
"Object",
"locateId",
")",
"{",
"return",
"blockStrategy",
".",
"locate",
"(",
"sqlquery",
",",
"queryParams",
",",
"locateId",
")",
";",
"}"
] | looking for a block in that there is a primary key is equals to the
locateId. for the sql sentence.
@param sqlquery
@param queryParams
@param locateId
@return if not locate, return null; | [
"looking",
"for",
"a",
"block",
"in",
"that",
"there",
"is",
"a",
"primary",
"key",
"is",
"equals",
"to",
"the",
"locateId",
".",
"for",
"the",
"sql",
"sentence",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-jdbc/src/main/java/com/jdon/model/query/PageIteratorSolver.java#L263-L265 |
23,604 | banq/jdonframework | src/main/java/com/jdon/util/ObjectCreator.java | ObjectCreator.createObject | public static Object createObject(String className, Object[] params) throws Exception {
return createObject(Class.forName(className), params);
} | java | public static Object createObject(String className, Object[] params) throws Exception {
return createObject(Class.forName(className), params);
} | [
"public",
"static",
"Object",
"createObject",
"(",
"String",
"className",
",",
"Object",
"[",
"]",
"params",
")",
"throws",
"Exception",
"{",
"return",
"createObject",
"(",
"Class",
".",
"forName",
"(",
"className",
")",
",",
"params",
")",
";",
"}"
] | Instantaite an Object instance, requires a constructor with parameters
@param className
full qualified name of the class
@param params
an array including the required parameters to instantaite the
object
@return the instantaited Object
@exception java.lang.Exception
if instantiation failed | [
"Instantaite",
"an",
"Object",
"instance",
"requires",
"a",
"constructor",
"with",
"parameters"
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/ObjectCreator.java#L59-L61 |
23,605 | banq/jdonframework | src/main/java/com/jdon/util/ObjectCreator.java | ObjectCreator.createObject | public static Object createObject(Class classObject, Object[] params) throws Exception {
Constructor[] constructors = classObject.getConstructors();
Object object = null;
for (int counter = 0; counter < constructors.length; counter++) {
try {
object = constructors[counter].newInstance(params);
} c... | java | public static Object createObject(Class classObject, Object[] params) throws Exception {
Constructor[] constructors = classObject.getConstructors();
Object object = null;
for (int counter = 0; counter < constructors.length; counter++) {
try {
object = constructors[counter].newInstance(params);
} c... | [
"public",
"static",
"Object",
"createObject",
"(",
"Class",
"classObject",
",",
"Object",
"[",
"]",
"params",
")",
"throws",
"Exception",
"{",
"Constructor",
"[",
"]",
"constructors",
"=",
"classObject",
".",
"getConstructors",
"(",
")",
";",
"Object",
"object... | Instantaite an Object instance, requires a constractor with parameters
@param classObject
, Class object representing the object type to be instantiated
@param params
an array including the required parameters to instantaite the
object
@return the instantaied Object
@exception java.lang.Exception
if instantiation fail... | [
"Instantaite",
"an",
"Object",
"instance",
"requires",
"a",
"constractor",
"with",
"parameters"
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/ObjectCreator.java#L75-L90 |
23,606 | banq/jdonframework | src/main/java/com/jdon/container/visitor/http/HttpSessionProxyComponentVisitor.java | HttpSessionProxyComponentVisitor.valueUnbound | public void valueUnbound(HttpSessionBindingEvent event) {
String sessionId = event.getSession().getId();
Debug.logVerbose("[JdonFramework] unvalueBound active, sessionId :" + sessionId, module);
Debug.logVerbose("[JdonFramework] unvalueUnbound active, componentsboxs size" + componentsboxsInSession.size(), modu... | java | public void valueUnbound(HttpSessionBindingEvent event) {
String sessionId = event.getSession().getId();
Debug.logVerbose("[JdonFramework] unvalueBound active, sessionId :" + sessionId, module);
Debug.logVerbose("[JdonFramework] unvalueUnbound active, componentsboxs size" + componentsboxsInSession.size(), modu... | [
"public",
"void",
"valueUnbound",
"(",
"HttpSessionBindingEvent",
"event",
")",
"{",
"String",
"sessionId",
"=",
"event",
".",
"getSession",
"(",
")",
".",
"getId",
"(",
")",
";",
"Debug",
".",
"logVerbose",
"(",
"\"[JdonFramework] unvalueBound active, sessionId :\"... | session destroyed. remove all references; | [
"session",
"destroyed",
".",
"remove",
"all",
"references",
";"
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/container/visitor/http/HttpSessionProxyComponentVisitor.java#L101-L111 |
23,607 | banq/jdonframework | src/main/java/com/jdon/container/visitor/http/HttpSessionProxyComponentVisitor.java | HttpSessionProxyComponentVisitor.visit | public Object visit() {
Object o = null;
try {
TargetMetaRequest targetMetaRequest = targetMetaRequestsHolder.getTargetMetaRequest();
StringBuilder sb = new StringBuilder(targetMetaRequest.getTargetMetaDef().getCacheKey());
sb.append(targetMetaRequest.getVisitableName());
Debug.logVerbose("[JdonFr... | java | public Object visit() {
Object o = null;
try {
TargetMetaRequest targetMetaRequest = targetMetaRequestsHolder.getTargetMetaRequest();
StringBuilder sb = new StringBuilder(targetMetaRequest.getTargetMetaDef().getCacheKey());
sb.append(targetMetaRequest.getVisitableName());
Debug.logVerbose("[JdonFr... | [
"public",
"Object",
"visit",
"(",
")",
"{",
"Object",
"o",
"=",
"null",
";",
"try",
"{",
"TargetMetaRequest",
"targetMetaRequest",
"=",
"targetMetaRequestsHolder",
".",
"getTargetMetaRequest",
"(",
")",
";",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(... | the object type saved in componentsboxs is decided by the method"
visitableFactory.createVisitable. only ejb service need cached, pojo
service not need.
@param targetMetaDef
TargetMetaDef
@return Object | [
"the",
"object",
"type",
"saved",
"in",
"componentsboxs",
"is",
"decided",
"by",
"the",
"method",
"visitableFactory",
".",
"createVisitable",
".",
"only",
"ejb",
"service",
"need",
"cached",
"pojo",
"service",
"not",
"need",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/container/visitor/http/HttpSessionProxyComponentVisitor.java#L122-L141 |
23,608 | banq/jdonframework | src/main/java/com/jdon/cache/UtilCache.java | UtilCache.put | public void put(Object key, Object value) {
if ((key == null) || (value == null))
return;
try {
if (maxSize > 0) {
// when maxSize is changed, the setter will take care of filling
// the
// LRU list
if (cacheLineTable.containsKey(key)) {
keyLRUList.moveFirst(key);
} else {... | java | public void put(Object key, Object value) {
if ((key == null) || (value == null))
return;
try {
if (maxSize > 0) {
// when maxSize is changed, the setter will take care of filling
// the
// LRU list
if (cacheLineTable.containsKey(key)) {
keyLRUList.moveFirst(key);
} else {... | [
"public",
"void",
"put",
"(",
"Object",
"key",
",",
"Object",
"value",
")",
"{",
"if",
"(",
"(",
"key",
"==",
"null",
")",
"||",
"(",
"value",
"==",
"null",
")",
")",
"return",
";",
"try",
"{",
"if",
"(",
"maxSize",
">",
"0",
")",
"{",
"// when... | Puts or loads the passed element into the cache
@param key
The key for the element, used to reference it in the hastables
and LRU linked list
@param value
The value of the element | [
"Puts",
"or",
"loads",
"the",
"passed",
"element",
"into",
"the",
"cache"
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/cache/UtilCache.java#L164-L195 |
23,609 | banq/jdonframework | src/main/java/com/jdon/cache/UtilCache.java | UtilCache.get | public Object get(final Object key) {
if (key == null)
return null;
if (!cacheLineTable.containsKey(key))
return null;
CacheLine line = (CacheLine) cacheLineTable.get(key);
if (hasExpired(line)) {
removeObject(key);
line = null;
}
if (line == null) {
missCount++;
return nul... | java | public Object get(final Object key) {
if (key == null)
return null;
if (!cacheLineTable.containsKey(key))
return null;
CacheLine line = (CacheLine) cacheLineTable.get(key);
if (hasExpired(line)) {
removeObject(key);
line = null;
}
if (line == null) {
missCount++;
return nul... | [
"public",
"Object",
"get",
"(",
"final",
"Object",
"key",
")",
"{",
"if",
"(",
"key",
"==",
"null",
")",
"return",
"null",
";",
"if",
"(",
"!",
"cacheLineTable",
".",
"containsKey",
"(",
"key",
")",
")",
"return",
"null",
";",
"CacheLine",
"line",
"=... | Gets an element from the cache according to the specified key. If the
requested element hasExpired, it is removed before it is looked up which
causes the function to return null.
@param key
The key for the element, used to reference it in the hastables
and LRU linked list
@return The value of the element specified by ... | [
"Gets",
"an",
"element",
"from",
"the",
"cache",
"according",
"to",
"the",
"specified",
"key",
".",
"If",
"the",
"requested",
"element",
"hasExpired",
"it",
"is",
"removed",
"before",
"it",
"is",
"looked",
"up",
"which",
"causes",
"the",
"function",
"to",
... | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/cache/UtilCache.java#L207-L234 |
23,610 | banq/jdonframework | src/main/java/com/jdon/cache/UtilCache.java | UtilCache.setMaxSize | public void setMaxSize(long maxSize) {
// if the new maxSize is <= 0, clear keyLRUList
if (maxSize <= 0) {
keyLRUList.clear();
} else if (maxSize > 0 && this.maxSize <= 0) {
// if the new maxSize > 0 and the old is <= 0, fill in LRU list -
// order will be meaningless for now
Iterator keys = ca... | java | public void setMaxSize(long maxSize) {
// if the new maxSize is <= 0, clear keyLRUList
if (maxSize <= 0) {
keyLRUList.clear();
} else if (maxSize > 0 && this.maxSize <= 0) {
// if the new maxSize > 0 and the old is <= 0, fill in LRU list -
// order will be meaningless for now
Iterator keys = ca... | [
"public",
"void",
"setMaxSize",
"(",
"long",
"maxSize",
")",
"{",
"// if the new maxSize is <= 0, clear keyLRUList\r",
"if",
"(",
"maxSize",
"<=",
"0",
")",
"{",
"keyLRUList",
".",
"clear",
"(",
")",
";",
"}",
"else",
"if",
"(",
"maxSize",
">",
"0",
"&&",
... | Sets the maximum number of elements in the cache. If 0, there is no
maximum.
@param maxSize
The maximum number of elements in the cache | [
"Sets",
"the",
"maximum",
"number",
"of",
"elements",
"in",
"the",
"cache",
".",
"If",
"0",
"there",
"is",
"no",
"maximum",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/cache/UtilCache.java#L314-L339 |
23,611 | banq/jdonframework | src/main/java/com/jdon/cache/UtilCache.java | UtilCache.setExpireTime | public void setExpireTime(long expireTime) {
// if expire time was <= 0 and is now greater, fill expire table now
if (this.expireTime <= 0 && expireTime > 0) {
long currentTime = System.currentTimeMillis();
Iterator values = cacheLineTable.values().iterator();
while (values.hasNext()) {
CacheLi... | java | public void setExpireTime(long expireTime) {
// if expire time was <= 0 and is now greater, fill expire table now
if (this.expireTime <= 0 && expireTime > 0) {
long currentTime = System.currentTimeMillis();
Iterator values = cacheLineTable.values().iterator();
while (values.hasNext()) {
CacheLi... | [
"public",
"void",
"setExpireTime",
"(",
"long",
"expireTime",
")",
"{",
"// if expire time was <= 0 and is now greater, fill expire table now\r",
"if",
"(",
"this",
".",
"expireTime",
"<=",
"0",
"&&",
"expireTime",
">",
"0",
")",
"{",
"long",
"currentTime",
"=",
"Sy... | Sets the expire time for the cache elements. If 0, elements never expire.
@param expireTime
The expire time for the cache elements | [
"Sets",
"the",
"expire",
"time",
"for",
"the",
"cache",
"elements",
".",
"If",
"0",
"elements",
"never",
"expire",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/cache/UtilCache.java#L356-L378 |
23,612 | banq/jdonframework | src/main/java/com/jdon/cache/UtilCache.java | UtilCache.containsKey | public boolean containsKey(Object key) {
CacheLine line = (CacheLine) cacheLineTable.get(key);
if (hasExpired(line)) {
removeObject(key);
line = null;
}
if (line != null) {
return true;
} else {
return false;
}
} | java | public boolean containsKey(Object key) {
CacheLine line = (CacheLine) cacheLineTable.get(key);
if (hasExpired(line)) {
removeObject(key);
line = null;
}
if (line != null) {
return true;
} else {
return false;
}
} | [
"public",
"boolean",
"containsKey",
"(",
"Object",
"key",
")",
"{",
"CacheLine",
"line",
"=",
"(",
"CacheLine",
")",
"cacheLineTable",
".",
"get",
"(",
"key",
")",
";",
"if",
"(",
"hasExpired",
"(",
"line",
")",
")",
"{",
"removeObject",
"(",
"key",
")... | Returns a boolean specifying whether or not an element with the specified
key is in the cache. If the requested element hasExpired, it is removed
before it is looked up which causes the function to return false.
@param key
The key for the element, used to reference it in the hastables
and LRU linked list
@return True ... | [
"Returns",
"a",
"boolean",
"specifying",
"whether",
"or",
"not",
"an",
"element",
"with",
"the",
"specified",
"key",
"is",
"in",
"the",
"cache",
".",
"If",
"the",
"requested",
"element",
"hasExpired",
"it",
"is",
"removed",
"before",
"it",
"is",
"looked",
... | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/cache/UtilCache.java#L417-L429 |
23,613 | banq/jdonframework | src/main/java/com/jdon/cache/UtilCache.java | UtilCache.hasExpired | public boolean hasExpired(Object key) {
if (key == null)
return false;
CacheLine line = (CacheLine) cacheLineTable.get(key);
return hasExpired(line);
} | java | public boolean hasExpired(Object key) {
if (key == null)
return false;
CacheLine line = (CacheLine) cacheLineTable.get(key);
return hasExpired(line);
} | [
"public",
"boolean",
"hasExpired",
"(",
"Object",
"key",
")",
"{",
"if",
"(",
"key",
"==",
"null",
")",
"return",
"false",
";",
"CacheLine",
"line",
"=",
"(",
"CacheLine",
")",
"cacheLineTable",
".",
"get",
"(",
"key",
")",
";",
"return",
"hasExpired",
... | Returns a boolean specifying whether or not the element corresponding to
the key has expired. Only returns true if element is in cache and has
expired. Error conditions return false, if no expireTable entry, returns
true. Always returns false if expireTime <= 0. Also, if SoftReference in
the CacheLine object has been c... | [
"Returns",
"a",
"boolean",
"specifying",
"whether",
"or",
"not",
"the",
"element",
"corresponding",
"to",
"the",
"key",
"has",
"expired",
".",
"Only",
"returns",
"true",
"if",
"element",
"is",
"in",
"cache",
"and",
"has",
"expired",
".",
"Error",
"conditions... | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/cache/UtilCache.java#L444-L451 |
23,614 | banq/jdonframework | src/main/java/com/jdon/cache/UtilCache.java | UtilCache.clearExpired | public void clearExpired() {
Iterator keys = cacheLineTable.keySet().iterator();
while (keys.hasNext()) {
Object key = keys.next();
if (hasExpired(key)) {
removeObject(key);
}
}
} | java | public void clearExpired() {
Iterator keys = cacheLineTable.keySet().iterator();
while (keys.hasNext()) {
Object key = keys.next();
if (hasExpired(key)) {
removeObject(key);
}
}
} | [
"public",
"void",
"clearExpired",
"(",
")",
"{",
"Iterator",
"keys",
"=",
"cacheLineTable",
".",
"keySet",
"(",
")",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"keys",
".",
"hasNext",
"(",
")",
")",
"{",
"Object",
"key",
"=",
"keys",
".",
"next",
... | Clears all expired cache entries; also clear any cache entries where the
SoftReference in the CacheLine object has been cleared by the gc | [
"Clears",
"all",
"expired",
"cache",
"entries",
";",
"also",
"clear",
"any",
"cache",
"entries",
"where",
"the",
"SoftReference",
"in",
"the",
"CacheLine",
"object",
"has",
"been",
"cleared",
"by",
"the",
"gc"
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/cache/UtilCache.java#L481-L491 |
23,615 | banq/jdonframework | src/main/java/com/jdon/util/StringUtil.java | StringUtil.decodeString | public static String decodeString(String str) {
try {
return new String(Base64.decode(str));
} catch (IOException io) {
throw new RuntimeException(io.getMessage(), io.getCause());
}
} | java | public static String decodeString(String str) {
try {
return new String(Base64.decode(str));
} catch (IOException io) {
throw new RuntimeException(io.getMessage(), io.getCause());
}
} | [
"public",
"static",
"String",
"decodeString",
"(",
"String",
"str",
")",
"{",
"try",
"{",
"return",
"new",
"String",
"(",
"Base64",
".",
"decode",
"(",
"str",
")",
")",
";",
"}",
"catch",
"(",
"IOException",
"io",
")",
"{",
"throw",
"new",
"RuntimeExce... | Decode a string using Base64 encoding.
@param str
@return String | [
"Decode",
"a",
"string",
"using",
"Base64",
"encoding",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/StringUtil.java#L552-L558 |
23,616 | banq/jdonframework | src/main/java/com/jdon/container/builder/ContainerRegistry.java | ContainerRegistry.registerAppRoot | public void registerAppRoot() {
containerWrapper.register(AppConfigureCollection.NAME, AppConfigureCollection.class);
containerWrapper.register(StartablecomponentsRegistry.NAME, StartablecomponentsRegistry.class);
} | java | public void registerAppRoot() {
containerWrapper.register(AppConfigureCollection.NAME, AppConfigureCollection.class);
containerWrapper.register(StartablecomponentsRegistry.NAME, StartablecomponentsRegistry.class);
} | [
"public",
"void",
"registerAppRoot",
"(",
")",
"{",
"containerWrapper",
".",
"register",
"(",
"AppConfigureCollection",
".",
"NAME",
",",
"AppConfigureCollection",
".",
"class",
")",
";",
"containerWrapper",
".",
"register",
"(",
"StartablecomponentsRegistry",
".",
... | register at first before xml and annotation | [
"register",
"at",
"first",
"before",
"xml",
"and",
"annotation"
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/container/builder/ContainerRegistry.java#L32-L35 |
23,617 | banq/jdonframework | doc/english/AppContextJdon.java | AppContextJdon.setApplicationContext | public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
this.applicationContext = applicationContext;
if (servletContext == null)
if (applicationContext instanceof WebApplicationContext) {
servletContext = ((WebApplicationContext) applicationContext).getServletC... | java | public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
this.applicationContext = applicationContext;
if (servletContext == null)
if (applicationContext instanceof WebApplicationContext) {
servletContext = ((WebApplicationContext) applicationContext).getServletC... | [
"public",
"void",
"setApplicationContext",
"(",
"ApplicationContext",
"applicationContext",
")",
"throws",
"BeansException",
"{",
"this",
".",
"applicationContext",
"=",
"applicationContext",
";",
"if",
"(",
"servletContext",
"==",
"null",
")",
"if",
"(",
"application... | ApplicationContextAware's method
at first run, startup Jdon Framework * | [
"ApplicationContextAware",
"s",
"method"
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/doc/english/AppContextJdon.java#L51-L69 |
23,618 | banq/jdonframework | doc/english/AppContextJdon.java | AppContextJdon.postProcessBeanDefinitionRegistry | public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) throws BeansException {
for (String beanName : registry.getBeanDefinitionNames()) {
BeanDefinition beanDefinition = registry.getBeanDefinition(beanName);
String beanClassName = beanDefinition.getBeanClassName();
try {
C... | java | public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) throws BeansException {
for (String beanName : registry.getBeanDefinitionNames()) {
BeanDefinition beanDefinition = registry.getBeanDefinition(beanName);
String beanClassName = beanDefinition.getBeanClassName();
try {
C... | [
"public",
"void",
"postProcessBeanDefinitionRegistry",
"(",
"BeanDefinitionRegistry",
"registry",
")",
"throws",
"BeansException",
"{",
"for",
"(",
"String",
"beanName",
":",
"registry",
".",
"getBeanDefinitionNames",
"(",
")",
")",
"{",
"BeanDefinition",
"beanDefinitio... | BeanDefinitionRegistryPostProcessor's method
second run: check which spring bean that need injected from Jdon. | [
"BeanDefinitionRegistryPostProcessor",
"s",
"method"
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/doc/english/AppContextJdon.java#L77-L99 |
23,619 | banq/jdonframework | src/main/java/com/jdon/async/disruptor/DisruptorForCommandFactory.java | DisruptorForCommandFactory.createDisruptor | public Disruptor createDisruptor(String topic) {
Disruptor disruptor = createDisruptorWithEventHandler(topic);
if (disruptor != null)
disruptor.start();
return disruptor;
} | java | public Disruptor createDisruptor(String topic) {
Disruptor disruptor = createDisruptorWithEventHandler(topic);
if (disruptor != null)
disruptor.start();
return disruptor;
} | [
"public",
"Disruptor",
"createDisruptor",
"(",
"String",
"topic",
")",
"{",
"Disruptor",
"disruptor",
"=",
"createDisruptorWithEventHandler",
"(",
"topic",
")",
";",
"if",
"(",
"disruptor",
"!=",
"null",
")",
"disruptor",
".",
"start",
"(",
")",
";",
"return",... | one event one EventDisruptor
@param topic
@return | [
"one",
"event",
"one",
"EventDisruptor"
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/async/disruptor/DisruptorForCommandFactory.java#L94-L100 |
23,620 | banq/jdonframework | src/main/java/com/jdon/aop/joinpoint/AdvisorChainFactory.java | AdvisorChainFactory.create | public List<MethodInterceptor> create(TargetMetaDef targetMetaDef) throws Exception {
Debug.logVerbose("[JdonFramework] enter create PointcutAdvisor ", module);
if (targetMetaDef.isEJB()) {
if (interceptorsForEJB.isEmpty()) {
createEJBAdvice(targetMetaDef);
}
return interceptorsForEJB;
}
... | java | public List<MethodInterceptor> create(TargetMetaDef targetMetaDef) throws Exception {
Debug.logVerbose("[JdonFramework] enter create PointcutAdvisor ", module);
if (targetMetaDef.isEJB()) {
if (interceptorsForEJB.isEmpty()) {
createEJBAdvice(targetMetaDef);
}
return interceptorsForEJB;
}
... | [
"public",
"List",
"<",
"MethodInterceptor",
">",
"create",
"(",
"TargetMetaDef",
"targetMetaDef",
")",
"throws",
"Exception",
"{",
"Debug",
".",
"logVerbose",
"(",
"\"[JdonFramework] enter create PointcutAdvisor \"",
",",
"module",
")",
";",
"if",
"(",
"targetMetaDe... | create the all interceptor instances, and put them into
interceptorsChain; the interceptors that prointcut is for SERVIERS are in
the front, and then the EJB Interceptors , in the back there are POJO
interceptors. you can change the orders bu replacing this class in
container.xml | [
"create",
"the",
"all",
"interceptor",
"instances",
"and",
"put",
"them",
"into",
"interceptorsChain",
";",
"the",
"interceptors",
"that",
"prointcut",
"is",
"for",
"SERVIERS",
"are",
"in",
"the",
"front",
"and",
"then",
"the",
"EJB",
"Interceptors",
"in",
"th... | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/aop/joinpoint/AdvisorChainFactory.java#L70-L90 |
23,621 | banq/jdonframework | JdonAccessory/jdon-struts1x/src/main/java/com/jdon/strutsutil/ModelSaveAction.java | ModelSaveAction.getModelForm | protected ModelForm getModelForm(ModelHandler modelHandler, ActionForm actionForm, HttpServletRequest request) throws Exception {
if (actionForm == null) {
throw new Exception(" must define form-bean as 'action' name in struts-config.xml ");
}
ModelForm strutsForm = (ModelForm) actionForm;
String acti... | java | protected ModelForm getModelForm(ModelHandler modelHandler, ActionForm actionForm, HttpServletRequest request) throws Exception {
if (actionForm == null) {
throw new Exception(" must define form-bean as 'action' name in struts-config.xml ");
}
ModelForm strutsForm = (ModelForm) actionForm;
String acti... | [
"protected",
"ModelForm",
"getModelForm",
"(",
"ModelHandler",
"modelHandler",
",",
"ActionForm",
"actionForm",
",",
"HttpServletRequest",
"request",
")",
"throws",
"Exception",
"{",
"if",
"(",
"actionForm",
"==",
"null",
")",
"{",
"throw",
"new",
"Exception",
"("... | get a ModelForm or create it. | [
"get",
"a",
"ModelForm",
"or",
"create",
"it",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-struts1x/src/main/java/com/jdon/strutsutil/ModelSaveAction.java#L119-L131 |
23,622 | banq/jdonframework | JdonAccessory/jdon-struts1x/src/main/java/com/jdon/strutsutil/ModelSaveAction.java | ModelSaveAction.makeModel | protected Object makeModel(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest request, ModelHandler modelHandler)
throws Exception {
Object model = null;
try {
String formName = actionMapping.getName();
if (formName == null)
throw new Exception("no define the FormName in strut... | java | protected Object makeModel(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest request, ModelHandler modelHandler)
throws Exception {
Object model = null;
try {
String formName = actionMapping.getName();
if (formName == null)
throw new Exception("no define the FormName in strut... | [
"protected",
"Object",
"makeModel",
"(",
"ActionMapping",
"actionMapping",
",",
"ActionForm",
"actionForm",
",",
"HttpServletRequest",
"request",
",",
"ModelHandler",
"modelHandler",
")",
"throws",
"Exception",
"{",
"Object",
"model",
"=",
"null",
";",
"try",
"{",
... | create a Model from the jdonframework.xml
@param actionMapping
@param actionForm
@param request
@return Model
@throws java.lang.Exception | [
"create",
"a",
"Model",
"from",
"the",
"jdonframework",
".",
"xml"
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-struts1x/src/main/java/com/jdon/strutsutil/ModelSaveAction.java#L142-L166 |
23,623 | banq/jdonframework | JdonAccessory/jdon-remote/src/main/java/com/jdon/bussinessproxy/remote/HessianToJdonServlet.java | HessianToJdonServlet.service | @Override
public void service(final ServletRequest req, final ServletResponse resp) throws ServletException, IOException {
HttpServletRequest request = (HttpServletRequest) req;
HttpServletResponse response = (HttpServletResponse) resp;
final String beanName = request.getPathInfo().sub... | java | @Override
public void service(final ServletRequest req, final ServletResponse resp) throws ServletException, IOException {
HttpServletRequest request = (HttpServletRequest) req;
HttpServletResponse response = (HttpServletResponse) resp;
final String beanName = request.getPathInfo().sub... | [
"@",
"Override",
"public",
"void",
"service",
"(",
"final",
"ServletRequest",
"req",
",",
"final",
"ServletResponse",
"resp",
")",
"throws",
"ServletException",
",",
"IOException",
"{",
"HttpServletRequest",
"request",
"=",
"(",
"HttpServletRequest",
")",
"req",
"... | Servlet to handle incoming Hessian requests and invoke HessianToJdonRequestProcessor.
@param req ServletRequest
@param resp ServletResponse
@throws javax.servlet.ServletException If errors occur
@throws java.io.IOException If IO errors occur | [
"Servlet",
"to",
"handle",
"incoming",
"Hessian",
"requests",
"and",
"invoke",
"HessianToJdonRequestProcessor",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-remote/src/main/java/com/jdon/bussinessproxy/remote/HessianToJdonServlet.java#L56-L63 |
23,624 | banq/jdonframework | src/main/java/com/jdon/util/UtilDateTime.java | UtilDateTime.toSqlDate | public static java.sql.Date toSqlDate(String date) {
java.util.Date newDate = toDate(date, "00:00:00");
if (newDate != null)
return new java.sql.Date(newDate.getTime());
else
return null;
} | java | public static java.sql.Date toSqlDate(String date) {
java.util.Date newDate = toDate(date, "00:00:00");
if (newDate != null)
return new java.sql.Date(newDate.getTime());
else
return null;
} | [
"public",
"static",
"java",
".",
"sql",
".",
"Date",
"toSqlDate",
"(",
"String",
"date",
")",
"{",
"java",
".",
"util",
".",
"Date",
"newDate",
"=",
"toDate",
"(",
"date",
",",
"\"00:00:00\"",
")",
";",
"if",
"(",
"newDate",
"!=",
"null",
")",
"retur... | Converts a date String into a java.sql.Date
@param date
The date String: MM/DD/YYYY
@return A java.sql.Date made from the date String | [
"Converts",
"a",
"date",
"String",
"into",
"a",
"java",
".",
"sql",
".",
"Date"
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/UtilDateTime.java#L97-L104 |
23,625 | banq/jdonframework | src/main/java/com/jdon/util/UtilDateTime.java | UtilDateTime.toSqlDate | public static java.sql.Date toSqlDate(String monthStr, String dayStr, String yearStr) {
java.util.Date newDate = toDate(monthStr, dayStr, yearStr, "0", "0", "0");
if (newDate != null)
return new java.sql.Date(newDate.getTime());
else
return null;
} | java | public static java.sql.Date toSqlDate(String monthStr, String dayStr, String yearStr) {
java.util.Date newDate = toDate(monthStr, dayStr, yearStr, "0", "0", "0");
if (newDate != null)
return new java.sql.Date(newDate.getTime());
else
return null;
} | [
"public",
"static",
"java",
".",
"sql",
".",
"Date",
"toSqlDate",
"(",
"String",
"monthStr",
",",
"String",
"dayStr",
",",
"String",
"yearStr",
")",
"{",
"java",
".",
"util",
".",
"Date",
"newDate",
"=",
"toDate",
"(",
"monthStr",
",",
"dayStr",
",",
"... | Makes a java.sql.Date from separate Strings for month, day, year
@param monthStr
The month String
@param dayStr
The day String
@param yearStr
The year String
@return A java.sql.Date made from separate Strings for month, day, year | [
"Makes",
"a",
"java",
".",
"sql",
".",
"Date",
"from",
"separate",
"Strings",
"for",
"month",
"day",
"year"
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/UtilDateTime.java#L117-L124 |
23,626 | banq/jdonframework | src/main/java/com/jdon/util/UtilDateTime.java | UtilDateTime.toSqlDate | public static java.sql.Date toSqlDate(int month, int day, int year) {
java.util.Date newDate = toDate(month, day, year, 0, 0, 0);
if (newDate != null)
return new java.sql.Date(newDate.getTime());
else
return null;
} | java | public static java.sql.Date toSqlDate(int month, int day, int year) {
java.util.Date newDate = toDate(month, day, year, 0, 0, 0);
if (newDate != null)
return new java.sql.Date(newDate.getTime());
else
return null;
} | [
"public",
"static",
"java",
".",
"sql",
".",
"Date",
"toSqlDate",
"(",
"int",
"month",
",",
"int",
"day",
",",
"int",
"year",
")",
"{",
"java",
".",
"util",
".",
"Date",
"newDate",
"=",
"toDate",
"(",
"month",
",",
"day",
",",
"year",
",",
"0",
"... | Makes a java.sql.Date from separate ints for month, day, year
@param month
The month int
@param day
The day int
@param year
The year int
@return A java.sql.Date made from separate ints for month, day, year | [
"Makes",
"a",
"java",
".",
"sql",
".",
"Date",
"from",
"separate",
"ints",
"for",
"month",
"day",
"year"
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/UtilDateTime.java#L137-L144 |
23,627 | banq/jdonframework | src/main/java/com/jdon/util/UtilDateTime.java | UtilDateTime.toSqlTime | public static java.sql.Time toSqlTime(String time) {
java.util.Date newDate = toDate("1/1/1970", time);
if (newDate != null)
return new java.sql.Time(newDate.getTime());
else
return null;
} | java | public static java.sql.Time toSqlTime(String time) {
java.util.Date newDate = toDate("1/1/1970", time);
if (newDate != null)
return new java.sql.Time(newDate.getTime());
else
return null;
} | [
"public",
"static",
"java",
".",
"sql",
".",
"Time",
"toSqlTime",
"(",
"String",
"time",
")",
"{",
"java",
".",
"util",
".",
"Date",
"newDate",
"=",
"toDate",
"(",
"\"1/1/1970\"",
",",
"time",
")",
";",
"if",
"(",
"newDate",
"!=",
"null",
")",
"retur... | Converts a time String into a java.sql.Time
@param time
The time String: either HH:MM or HH:MM:SS
@return A java.sql.Time made from the time String | [
"Converts",
"a",
"time",
"String",
"into",
"a",
"java",
".",
"sql",
".",
"Time"
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/UtilDateTime.java#L153-L160 |
23,628 | banq/jdonframework | src/main/java/com/jdon/util/UtilDateTime.java | UtilDateTime.toSqlTime | public static java.sql.Time toSqlTime(String hourStr, String minuteStr, String secondStr) {
java.util.Date newDate = toDate("0", "0", "0", hourStr, minuteStr, secondStr);
if (newDate != null)
return new java.sql.Time(newDate.getTime());
else
return null;
} | java | public static java.sql.Time toSqlTime(String hourStr, String minuteStr, String secondStr) {
java.util.Date newDate = toDate("0", "0", "0", hourStr, minuteStr, secondStr);
if (newDate != null)
return new java.sql.Time(newDate.getTime());
else
return null;
} | [
"public",
"static",
"java",
".",
"sql",
".",
"Time",
"toSqlTime",
"(",
"String",
"hourStr",
",",
"String",
"minuteStr",
",",
"String",
"secondStr",
")",
"{",
"java",
".",
"util",
".",
"Date",
"newDate",
"=",
"toDate",
"(",
"\"0\"",
",",
"\"0\"",
",",
"... | Makes a java.sql.Time from separate Strings for hour, minute, and second.
@param hourStr
The hour String
@param minuteStr
The minute String
@param secondStr
The second String
@return A java.sql.Time made from separate Strings for hour, minute, and
second. | [
"Makes",
"a",
"java",
".",
"sql",
".",
"Time",
"from",
"separate",
"Strings",
"for",
"hour",
"minute",
"and",
"second",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/UtilDateTime.java#L174-L181 |
23,629 | banq/jdonframework | src/main/java/com/jdon/util/UtilDateTime.java | UtilDateTime.toSqlTime | public static java.sql.Time toSqlTime(int hour, int minute, int second) {
java.util.Date newDate = toDate(0, 0, 0, hour, minute, second);
if (newDate != null)
return new java.sql.Time(newDate.getTime());
else
return null;
} | java | public static java.sql.Time toSqlTime(int hour, int minute, int second) {
java.util.Date newDate = toDate(0, 0, 0, hour, minute, second);
if (newDate != null)
return new java.sql.Time(newDate.getTime());
else
return null;
} | [
"public",
"static",
"java",
".",
"sql",
".",
"Time",
"toSqlTime",
"(",
"int",
"hour",
",",
"int",
"minute",
",",
"int",
"second",
")",
"{",
"java",
".",
"util",
".",
"Date",
"newDate",
"=",
"toDate",
"(",
"0",
",",
"0",
",",
"0",
",",
"hour",
","... | Makes a java.sql.Time from separate ints for hour, minute, and second.
@param hour
The hour int
@param minute
The minute int
@param second
The second int
@return A java.sql.Time made from separate ints for hour, minute, and
second. | [
"Makes",
"a",
"java",
".",
"sql",
".",
"Time",
"from",
"separate",
"ints",
"for",
"hour",
"minute",
"and",
"second",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/UtilDateTime.java#L195-L202 |
23,630 | banq/jdonframework | src/main/java/com/jdon/util/UtilDateTime.java | UtilDateTime.toTimestamp | public static java.sql.Timestamp toTimestamp(String dateTime) {
java.util.Date newDate = toDate(dateTime);
if (newDate != null)
return new java.sql.Timestamp(newDate.getTime());
else
return null;
} | java | public static java.sql.Timestamp toTimestamp(String dateTime) {
java.util.Date newDate = toDate(dateTime);
if (newDate != null)
return new java.sql.Timestamp(newDate.getTime());
else
return null;
} | [
"public",
"static",
"java",
".",
"sql",
".",
"Timestamp",
"toTimestamp",
"(",
"String",
"dateTime",
")",
"{",
"java",
".",
"util",
".",
"Date",
"newDate",
"=",
"toDate",
"(",
"dateTime",
")",
";",
"if",
"(",
"newDate",
"!=",
"null",
")",
"return",
"new... | Converts a date and time String into a Timestamp
@param dateTime
A combined data and time string in the format
"MM/DD/YYYY HH:MM:SS", the seconds are optional
@return The corresponding Timestamp | [
"Converts",
"a",
"date",
"and",
"time",
"String",
"into",
"a",
"Timestamp"
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/UtilDateTime.java#L212-L219 |
23,631 | banq/jdonframework | src/main/java/com/jdon/util/UtilDateTime.java | UtilDateTime.toTimestamp | public static java.sql.Timestamp toTimestamp(String date, String time) {
java.util.Date newDate = toDate(date, time);
if (newDate != null)
return new java.sql.Timestamp(newDate.getTime());
else
return null;
} | java | public static java.sql.Timestamp toTimestamp(String date, String time) {
java.util.Date newDate = toDate(date, time);
if (newDate != null)
return new java.sql.Timestamp(newDate.getTime());
else
return null;
} | [
"public",
"static",
"java",
".",
"sql",
".",
"Timestamp",
"toTimestamp",
"(",
"String",
"date",
",",
"String",
"time",
")",
"{",
"java",
".",
"util",
".",
"Date",
"newDate",
"=",
"toDate",
"(",
"date",
",",
"time",
")",
";",
"if",
"(",
"newDate",
"!=... | Converts a date String and a time String into a Timestamp
@param date
The date String: MM/DD/YYYY
@param time
The time String: either HH:MM or HH:MM:SS
@return A Timestamp made from the date and time Strings | [
"Converts",
"a",
"date",
"String",
"and",
"a",
"time",
"String",
"into",
"a",
"Timestamp"
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/UtilDateTime.java#L230-L237 |
23,632 | banq/jdonframework | src/main/java/com/jdon/util/UtilDateTime.java | UtilDateTime.toTimestamp | public static java.sql.Timestamp toTimestamp(String monthStr, String dayStr, String yearStr, String hourStr, String minuteStr, String secondStr) {
java.util.Date newDate = toDate(monthStr, dayStr, yearStr, hourStr, minuteStr, secondStr);
if (newDate != null)
return new java.sql.Timestamp(newDate.getTime());... | java | public static java.sql.Timestamp toTimestamp(String monthStr, String dayStr, String yearStr, String hourStr, String minuteStr, String secondStr) {
java.util.Date newDate = toDate(monthStr, dayStr, yearStr, hourStr, minuteStr, secondStr);
if (newDate != null)
return new java.sql.Timestamp(newDate.getTime());... | [
"public",
"static",
"java",
".",
"sql",
".",
"Timestamp",
"toTimestamp",
"(",
"String",
"monthStr",
",",
"String",
"dayStr",
",",
"String",
"yearStr",
",",
"String",
"hourStr",
",",
"String",
"minuteStr",
",",
"String",
"secondStr",
")",
"{",
"java",
".",
... | Makes a Timestamp from separate Strings for month, day, year, hour,
minute, and second.
@param monthStr
The month String
@param dayStr
The day String
@param yearStr
The year String
@param hourStr
The hour String
@param minuteStr
The minute String
@param secondStr
The second String
@return A Timestamp made from separat... | [
"Makes",
"a",
"Timestamp",
"from",
"separate",
"Strings",
"for",
"month",
"day",
"year",
"hour",
"minute",
"and",
"second",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/UtilDateTime.java#L258-L265 |
23,633 | banq/jdonframework | src/main/java/com/jdon/util/UtilDateTime.java | UtilDateTime.toTimestamp | public static java.sql.Timestamp toTimestamp(int month, int day, int year, int hour, int minute, int second) {
java.util.Date newDate = toDate(month, day, year, hour, minute, second);
if (newDate != null)
return new java.sql.Timestamp(newDate.getTime());
else
return null;
} | java | public static java.sql.Timestamp toTimestamp(int month, int day, int year, int hour, int minute, int second) {
java.util.Date newDate = toDate(month, day, year, hour, minute, second);
if (newDate != null)
return new java.sql.Timestamp(newDate.getTime());
else
return null;
} | [
"public",
"static",
"java",
".",
"sql",
".",
"Timestamp",
"toTimestamp",
"(",
"int",
"month",
",",
"int",
"day",
",",
"int",
"year",
",",
"int",
"hour",
",",
"int",
"minute",
",",
"int",
"second",
")",
"{",
"java",
".",
"util",
".",
"Date",
"newDate"... | Makes a Timestamp from separate ints for month, day, year, hour, minute,
and second.
@param month
The month int
@param day
The day int
@param year
The year int
@param hour
The hour int
@param minute
The minute int
@param second
The second int
@return A Timestamp made from separate ints for month, day, year, hour,
minu... | [
"Makes",
"a",
"Timestamp",
"from",
"separate",
"ints",
"for",
"month",
"day",
"year",
"hour",
"minute",
"and",
"second",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/UtilDateTime.java#L286-L293 |
23,634 | banq/jdonframework | src/main/java/com/jdon/util/UtilDateTime.java | UtilDateTime.toDate | public static java.util.Date toDate(String dateTime) {
// dateTime must have one space between the date and time...
String date = dateTime.substring(0, dateTime.indexOf(" "));
String time = dateTime.substring(dateTime.indexOf(" ") + 1);
return toDate(date, time);
} | java | public static java.util.Date toDate(String dateTime) {
// dateTime must have one space between the date and time...
String date = dateTime.substring(0, dateTime.indexOf(" "));
String time = dateTime.substring(dateTime.indexOf(" ") + 1);
return toDate(date, time);
} | [
"public",
"static",
"java",
".",
"util",
".",
"Date",
"toDate",
"(",
"String",
"dateTime",
")",
"{",
"// dateTime must have one space between the date and time...\r",
"String",
"date",
"=",
"dateTime",
".",
"substring",
"(",
"0",
",",
"dateTime",
".",
"indexOf",
"... | Converts a date and time String into a Date
@param dateTime
A combined data and time string in the format
"MM/DD/YYYY HH:MM:SS", the seconds are optional
@return The corresponding Date | [
"Converts",
"a",
"date",
"and",
"time",
"String",
"into",
"a",
"Date"
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/UtilDateTime.java#L303-L309 |
23,635 | banq/jdonframework | src/main/java/com/jdon/util/UtilDateTime.java | UtilDateTime.toDate | public static java.util.Date toDate(String date, String time) {
if (date == null || time == null)
return null;
String month;
String day;
String year;
String hour;
String minute;
String second;
int dateSlash1 = date.indexOf("/");
int dateSlash2 = date.lastIndexOf("/");
if (dateSlash... | java | public static java.util.Date toDate(String date, String time) {
if (date == null || time == null)
return null;
String month;
String day;
String year;
String hour;
String minute;
String second;
int dateSlash1 = date.indexOf("/");
int dateSlash2 = date.lastIndexOf("/");
if (dateSlash... | [
"public",
"static",
"java",
".",
"util",
".",
"Date",
"toDate",
"(",
"String",
"date",
",",
"String",
"time",
")",
"{",
"if",
"(",
"date",
"==",
"null",
"||",
"time",
"==",
"null",
")",
"return",
"null",
";",
"String",
"month",
";",
"String",
"day",
... | Converts a date String and a time String into a Date
@param date
The date String: MM/DD/YYYY
@param time
The time String: either HH:MM or HH:MM:SS
@return A Date made from the date and time Strings | [
"Converts",
"a",
"date",
"String",
"and",
"a",
"time",
"String",
"into",
"a",
"Date"
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/UtilDateTime.java#L320-L354 |
23,636 | banq/jdonframework | src/main/java/com/jdon/util/UtilDateTime.java | UtilDateTime.toDate | public static java.util.Date toDate(String monthStr, String dayStr, String yearStr, String hourStr, String minuteStr, String secondStr) {
int month, day, year, hour, minute, second;
try {
month = Integer.parseInt(monthStr);
day = Integer.parseInt(dayStr);
year = Integer.parseInt(yearStr);
hour =... | java | public static java.util.Date toDate(String monthStr, String dayStr, String yearStr, String hourStr, String minuteStr, String secondStr) {
int month, day, year, hour, minute, second;
try {
month = Integer.parseInt(monthStr);
day = Integer.parseInt(dayStr);
year = Integer.parseInt(yearStr);
hour =... | [
"public",
"static",
"java",
".",
"util",
".",
"Date",
"toDate",
"(",
"String",
"monthStr",
",",
"String",
"dayStr",
",",
"String",
"yearStr",
",",
"String",
"hourStr",
",",
"String",
"minuteStr",
",",
"String",
"secondStr",
")",
"{",
"int",
"month",
",",
... | Makes a Date from separate Strings for month, day, year, hour, minute,
and second.
@param monthStr
The month String
@param dayStr
The day String
@param yearStr
The year String
@param hourStr
The hour String
@param minuteStr
The minute String
@param secondStr
The second String
@return A Date made from separate Strings ... | [
"Makes",
"a",
"Date",
"from",
"separate",
"Strings",
"for",
"month",
"day",
"year",
"hour",
"minute",
"and",
"second",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/UtilDateTime.java#L375-L389 |
23,637 | banq/jdonframework | src/main/java/com/jdon/util/UtilDateTime.java | UtilDateTime.toDate | public static java.util.Date toDate(int month, int day, int year, int hour, int minute, int second) {
Calendar calendar = Calendar.getInstance();
try {
calendar.set(year, month - 1, day, hour, minute, second);
} catch (Exception e) {
return null;
}
return new java.util.Date(calendar.getTime().g... | java | public static java.util.Date toDate(int month, int day, int year, int hour, int minute, int second) {
Calendar calendar = Calendar.getInstance();
try {
calendar.set(year, month - 1, day, hour, minute, second);
} catch (Exception e) {
return null;
}
return new java.util.Date(calendar.getTime().g... | [
"public",
"static",
"java",
".",
"util",
".",
"Date",
"toDate",
"(",
"int",
"month",
",",
"int",
"day",
",",
"int",
"year",
",",
"int",
"hour",
",",
"int",
"minute",
",",
"int",
"second",
")",
"{",
"Calendar",
"calendar",
"=",
"Calendar",
".",
"getIn... | Makes a Date from separate ints for month, day, year, hour, minute, and
second.
@param month
The month int
@param day
The day int
@param year
The year int
@param hour
The hour int
@param minute
The minute int
@param second
The second int
@return A Date made from separate ints for month, day, year, hour,
minute, and se... | [
"Makes",
"a",
"Date",
"from",
"separate",
"ints",
"for",
"month",
"day",
"year",
"hour",
"minute",
"and",
"second",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/UtilDateTime.java#L410-L419 |
23,638 | banq/jdonframework | src/main/java/com/jdon/util/UtilDateTime.java | UtilDateTime.monthBegin | public static java.sql.Timestamp monthBegin() {
Calendar mth = Calendar.getInstance();
mth.set(Calendar.DAY_OF_MONTH, 1);
mth.set(Calendar.HOUR_OF_DAY, 0);
mth.set(Calendar.MINUTE, 0);
mth.set(Calendar.SECOND, 0);
mth.set(Calendar.AM_PM, Calendar.AM);
return new java.sql.Timestamp(mth.getTime().g... | java | public static java.sql.Timestamp monthBegin() {
Calendar mth = Calendar.getInstance();
mth.set(Calendar.DAY_OF_MONTH, 1);
mth.set(Calendar.HOUR_OF_DAY, 0);
mth.set(Calendar.MINUTE, 0);
mth.set(Calendar.SECOND, 0);
mth.set(Calendar.AM_PM, Calendar.AM);
return new java.sql.Timestamp(mth.getTime().g... | [
"public",
"static",
"java",
".",
"sql",
".",
"Timestamp",
"monthBegin",
"(",
")",
"{",
"Calendar",
"mth",
"=",
"Calendar",
".",
"getInstance",
"(",
")",
";",
"mth",
".",
"set",
"(",
"Calendar",
".",
"DAY_OF_MONTH",
",",
"1",
")",
";",
"mth",
".",
"se... | Makes a Timestamp for the beginning of the month
@return A Timestamp of the beginning of the month | [
"Makes",
"a",
"Timestamp",
"for",
"the",
"beginning",
"of",
"the",
"month"
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/UtilDateTime.java#L537-L546 |
23,639 | banq/jdonframework | JdonAccessory/jdon-struts1x/src/main/java/com/jdon/strutsutil/file/MultiImageForm.java | MultiImageForm.validate | public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
ActionErrors errors = null;
// has the maximum length been exceeded?
Boolean maxLengthExceeded = (Boolean) request.getAttribute(MultipartRequestHandler.ATTRIBUTE_MAX_LENGTH_EXCEEDED);
if ((maxLengthExceeded != null) && (maxL... | java | public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
ActionErrors errors = null;
// has the maximum length been exceeded?
Boolean maxLengthExceeded = (Boolean) request.getAttribute(MultipartRequestHandler.ATTRIBUTE_MAX_LENGTH_EXCEEDED);
if ((maxLengthExceeded != null) && (maxL... | [
"public",
"ActionErrors",
"validate",
"(",
"ActionMapping",
"mapping",
",",
"HttpServletRequest",
"request",
")",
"{",
"ActionErrors",
"errors",
"=",
"null",
";",
"// has the maximum length been exceeded?\r",
"Boolean",
"maxLengthExceeded",
"=",
"(",
"Boolean",
")",
"re... | Check to make sure the client hasn't exceeded the maximum allowed upload
size inside of this validate method. | [
"Check",
"to",
"make",
"sure",
"the",
"client",
"hasn",
"t",
"exceeded",
"the",
"maximum",
"allowed",
"upload",
"size",
"inside",
"of",
"this",
"validate",
"method",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-struts1x/src/main/java/com/jdon/strutsutil/file/MultiImageForm.java#L94-L119 |
23,640 | banq/jdonframework | src/main/java/com/jdon/aop/reflection/MethodInvokerUtil.java | MethodInvokerUtil.execute | public Object execute(Method method, Object targetObj, Object[] p_args) throws Throwable {
try {
if ((method == null) || (targetObj == null))
Debug.logError("[JdonFramework] no method or target, please check your configure", module);
if (p_args == null)
p_args = new Object[0];
Debug.logVerbose(... | java | public Object execute(Method method, Object targetObj, Object[] p_args) throws Throwable {
try {
if ((method == null) || (targetObj == null))
Debug.logError("[JdonFramework] no method or target, please check your configure", module);
if (p_args == null)
p_args = new Object[0];
Debug.logVerbose(... | [
"public",
"Object",
"execute",
"(",
"Method",
"method",
",",
"Object",
"targetObj",
",",
"Object",
"[",
"]",
"p_args",
")",
"throws",
"Throwable",
"{",
"try",
"{",
"if",
"(",
"(",
"method",
"==",
"null",
")",
"||",
"(",
"targetObj",
"==",
"null",
")",
... | the service execute by method reflection
@param method
@param targetObj
@param p_args
@return
@throws Throwable | [
"the",
"service",
"execute",
"by",
"method",
"reflection"
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/aop/reflection/MethodInvokerUtil.java#L54-L88 |
23,641 | banq/jdonframework | src/main/java/com/jdon/aop/reflection/MethodInvokerUtil.java | MethodInvokerUtil.createTargetObject | public Object createTargetObject(TargetServiceFactory targetServiceFactory) {
Debug.logVerbose("[JdonFramework] now getTargetObject by visitor ", module);
Object targetObjRef = null;
try {
TargetMetaRequest targetMetaRequest = targetMetaRequestsHolder.getTargetMetaRequest();
TargetMetaDef targetMetaDef... | java | public Object createTargetObject(TargetServiceFactory targetServiceFactory) {
Debug.logVerbose("[JdonFramework] now getTargetObject by visitor ", module);
Object targetObjRef = null;
try {
TargetMetaRequest targetMetaRequest = targetMetaRequestsHolder.getTargetMetaRequest();
TargetMetaDef targetMetaDef... | [
"public",
"Object",
"createTargetObject",
"(",
"TargetServiceFactory",
"targetServiceFactory",
")",
"{",
"Debug",
".",
"logVerbose",
"(",
"\"[JdonFramework] now getTargetObject by visitor \"",
",",
"module",
")",
";",
"Object",
"targetObjRef",
"=",
"null",
";",
"try",
"... | if target service is ejb object, cache it, so this function can active
stateful session bean.
@param targetServiceFactory
@param targetMetaDef
@return
@throws Exception | [
"if",
"target",
"service",
"is",
"ejb",
"object",
"cache",
"it",
"so",
"this",
"function",
"can",
"active",
"stateful",
"session",
"bean",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/aop/reflection/MethodInvokerUtil.java#L99-L118 |
23,642 | banq/jdonframework | JdonAccessory/jdon-struts1x/src/main/java/com/jdon/model/ModelHandler.java | ModelHandler.initModelIF | public Object initModelIF(EventModel em, ModelForm form, HttpServletRequest request) throws Exception {
return initModel(request);
} | java | public Object initModelIF(EventModel em, ModelForm form, HttpServletRequest request) throws Exception {
return initModel(request);
} | [
"public",
"Object",
"initModelIF",
"(",
"EventModel",
"em",
",",
"ModelForm",
"form",
",",
"HttpServletRequest",
"request",
")",
"throws",
"Exception",
"{",
"return",
"initModel",
"(",
"request",
")",
";",
"}"
] | Presentation layer need a ModelForm instance that include some initially
data, these data must obtain from service. this method implements these
functions by deleagating service.
this mehtod is only availabe in pushing create view page in pushing
editable view page, the model is obtained by it's key, not from this
met... | [
"Presentation",
"layer",
"need",
"a",
"ModelForm",
"instance",
"that",
"include",
"some",
"initially",
"data",
"these",
"data",
"must",
"obtain",
"from",
"service",
".",
"this",
"method",
"implements",
"these",
"functions",
"by",
"deleagating",
"service",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-struts1x/src/main/java/com/jdon/model/ModelHandler.java#L102-L104 |
23,643 | banq/jdonframework | JdonAccessory/jdon-struts1x/src/main/java/com/jdon/model/ModelHandler.java | ModelHandler.findModelIF | public Object findModelIF(Object keyValue, HttpServletRequest request) throws Exception {
return findModelByKey((String) keyValue, request); // for old version
} | java | public Object findModelIF(Object keyValue, HttpServletRequest request) throws Exception {
return findModelByKey((String) keyValue, request); // for old version
} | [
"public",
"Object",
"findModelIF",
"(",
"Object",
"keyValue",
",",
"HttpServletRequest",
"request",
")",
"throws",
"Exception",
"{",
"return",
"findModelByKey",
"(",
"(",
"String",
")",
"keyValue",
",",
"request",
")",
";",
"// for old version\r",
"}"
] | obtain a existed Model instance by his primtive key.
@param keyValue
primtive key
@param request
@return Model
@throws java.lang.Exception | [
"obtain",
"a",
"existed",
"Model",
"instance",
"by",
"his",
"primtive",
"key",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-struts1x/src/main/java/com/jdon/model/ModelHandler.java#L126-L128 |
23,644 | banq/jdonframework | JdonAccessory/jdon-struts1x/src/main/java/com/jdon/model/ModelHandler.java | ModelHandler.modelCopyToForm | public void modelCopyToForm(Model model, ModelForm form) throws Exception {
try {
PropertyUtils.copyProperties(form, model);
} catch (Exception e) {
String error = " Model:" + model.getClass().getName() + " copy To ModelForm:" + form.getClass().getName() + " error:" + e;
Debug.logError(error, module);... | java | public void modelCopyToForm(Model model, ModelForm form) throws Exception {
try {
PropertyUtils.copyProperties(form, model);
} catch (Exception e) {
String error = " Model:" + model.getClass().getName() + " copy To ModelForm:" + form.getClass().getName() + " error:" + e;
Debug.logError(error, module);... | [
"public",
"void",
"modelCopyToForm",
"(",
"Model",
"model",
",",
"ModelForm",
"form",
")",
"throws",
"Exception",
"{",
"try",
"{",
"PropertyUtils",
".",
"copyProperties",
"(",
"form",
",",
"model",
")",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
... | for old version below 1.4 | [
"for",
"old",
"version",
"below",
"1",
".",
"4"
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-struts1x/src/main/java/com/jdon/model/ModelHandler.java#L148-L156 |
23,645 | banq/jdonframework | JdonAccessory/jdon-struts1x/src/main/java/com/jdon/model/ModelHandler.java | ModelHandler.formCopyToModelIF | public void formCopyToModelIF(ModelForm form, Object model) throws Exception {
if (model == null || form == null)
return;
if (model instanceof Model) { // for below 1.4 version
formCopyToModel(form, (Model) model);
return;
}
try {
PropertyUtils.copyProperties(model, form);
} catch (Invoca... | java | public void formCopyToModelIF(ModelForm form, Object model) throws Exception {
if (model == null || form == null)
return;
if (model instanceof Model) { // for below 1.4 version
formCopyToModel(form, (Model) model);
return;
}
try {
PropertyUtils.copyProperties(model, form);
} catch (Invoca... | [
"public",
"void",
"formCopyToModelIF",
"(",
"ModelForm",
"form",
",",
"Object",
"model",
")",
"throws",
"Exception",
"{",
"if",
"(",
"model",
"==",
"null",
"||",
"form",
"==",
"null",
")",
"return",
";",
"if",
"(",
"model",
"instanceof",
"Model",
")",
"{... | ModelForm object's data transfer to Model object
default implemention is copy mapping between with them;
another implemention: String propertyName =
StringUtil.getLastString(model.getClass().getName()); Model hasDataModel
= PropertyUtils.getProperty(form, propertyName); model = hasDataModel;
extends this class , and... | [
"ModelForm",
"object",
"s",
"data",
"transfer",
"to",
"Model",
"object"
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-struts1x/src/main/java/com/jdon/model/ModelHandler.java#L214-L233 |
23,646 | banq/jdonframework | JdonAccessory/jdon-remote/src/main/java/com/jdon/bussinessproxy/remote/hessian/io/JdonJavaSerializer.java | JdonJavaSerializer.writeObject | public void writeObject(Object obj, AbstractHessianOutput out)
throws IOException {
if (out.addRef(obj)) {
return;
}
Class< ? > cl = obj.getClass();
try {
if (writeReplace != null) {
Object repl = writeReplace.... | java | public void writeObject(Object obj, AbstractHessianOutput out)
throws IOException {
if (out.addRef(obj)) {
return;
}
Class< ? > cl = obj.getClass();
try {
if (writeReplace != null) {
Object repl = writeReplace.... | [
"public",
"void",
"writeObject",
"(",
"Object",
"obj",
",",
"AbstractHessianOutput",
"out",
")",
"throws",
"IOException",
"{",
"if",
"(",
"out",
".",
"addRef",
"(",
"obj",
")",
")",
"{",
"return",
";",
"}",
"Class",
"<",
"?",
">",
"cl",
"=",
"obj",
"... | Write object in output
@param obj - Object
@param out - AbstractHessianOutput
@throws IOException - occur if input/output error occur | [
"Write",
"object",
"in",
"output"
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-remote/src/main/java/com/jdon/bussinessproxy/remote/hessian/io/JdonJavaSerializer.java#L124-L199 |
23,647 | banq/jdonframework | JdonAccessory/jdon-remote/src/main/java/com/jdon/bussinessproxy/remote/hessian/io/JdonJavaSerializer.java | JdonJavaSerializer.findSetter | private Method findSetter(Method []methods, String getterName, Class< ? > arg) {
String setterName = "set" + getterName.substring(INT_VALUE);
for (int i = 0; i < methods.length; i++) {
Method method = methods[i];
if (!method.getName().equals(setterName)) {
... | java | private Method findSetter(Method []methods, String getterName, Class< ? > arg) {
String setterName = "set" + getterName.substring(INT_VALUE);
for (int i = 0; i < methods.length; i++) {
Method method = methods[i];
if (!method.getName().equals(setterName)) {
... | [
"private",
"Method",
"findSetter",
"(",
"Method",
"[",
"]",
"methods",
",",
"String",
"getterName",
",",
"Class",
"<",
"?",
">",
"arg",
")",
"{",
"String",
"setterName",
"=",
"\"set\"",
"+",
"getterName",
".",
"substring",
"(",
"INT_VALUE",
")",
";",
"fo... | Finds any matching setter. | [
"Finds",
"any",
"matching",
"setter",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-remote/src/main/java/com/jdon/bussinessproxy/remote/hessian/io/JdonJavaSerializer.java#L204-L225 |
23,648 | banq/jdonframework | src/main/java/com/jdon/controller/service/ServiceFacade.java | ServiceFacade.getServiceFactory | public ServiceFactory getServiceFactory(AppContextWrapper sc) {
ContainerWrapper containerWrapper = containerFinder.findContainer(sc);
ServiceFactory serviceFactory = (ServiceFactory) containerWrapper.lookup(ComponentKeys.WEBSERVICE_FACTORY);
return serviceFactory;
} | java | public ServiceFactory getServiceFactory(AppContextWrapper sc) {
ContainerWrapper containerWrapper = containerFinder.findContainer(sc);
ServiceFactory serviceFactory = (ServiceFactory) containerWrapper.lookup(ComponentKeys.WEBSERVICE_FACTORY);
return serviceFactory;
} | [
"public",
"ServiceFactory",
"getServiceFactory",
"(",
"AppContextWrapper",
"sc",
")",
"{",
"ContainerWrapper",
"containerWrapper",
"=",
"containerFinder",
".",
"findContainer",
"(",
"sc",
")",
";",
"ServiceFactory",
"serviceFactory",
"=",
"(",
"ServiceFactory",
")",
"... | the model configure in jdonframework.xml will execute the service
directly.
and the remote servlet will call this method
@return Returns the serviceFactory. | [
"the",
"model",
"configure",
"in",
"jdonframework",
".",
"xml",
"will",
"execute",
"the",
"service",
"directly",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/controller/service/ServiceFacade.java#L56-L60 |
23,649 | banq/jdonframework | src/main/java/com/jdon/controller/service/WebServiceImp.java | WebServiceImp.execute | public Object execute(String name, MethodMetaArgs methodMetaArgs, AppContextWrapper acw) throws Exception {
if ((methodMetaArgs == null) || (methodMetaArgs.getMethodName() == null)) {
Debug.logWarning(" methodMetaArgs is null. cann't invoke service.execute");
}
Debug.logVerbose("+++++++++++++++++++++++++++... | java | public Object execute(String name, MethodMetaArgs methodMetaArgs, AppContextWrapper acw) throws Exception {
if ((methodMetaArgs == null) || (methodMetaArgs.getMethodName() == null)) {
Debug.logWarning(" methodMetaArgs is null. cann't invoke service.execute");
}
Debug.logVerbose("+++++++++++++++++++++++++++... | [
"public",
"Object",
"execute",
"(",
"String",
"name",
",",
"MethodMetaArgs",
"methodMetaArgs",
",",
"AppContextWrapper",
"acw",
")",
"throws",
"Exception",
"{",
"if",
"(",
"(",
"methodMetaArgs",
"==",
"null",
")",
"||",
"(",
"methodMetaArgs",
".",
"getMethodName... | running the service, and return the result without session | [
"running",
"the",
"service",
"and",
"return",
"the",
"result",
"without",
"session"
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/controller/service/WebServiceImp.java#L78-L92 |
23,650 | banq/jdonframework | src/main/java/com/jdon/aop/interceptor/CacheInterceptor.java | CacheInterceptor.methodMatchsModelGET | private boolean methodMatchsModelGET(Method method) {
boolean condition = false;
try {
if (isModelCache.contains(method)) {
condition = true;
return condition;
}
String mehtodName = method.getName();
if (method.getReturnType() == null)
return condition; // 无返回值,不做缓存
Class retu... | java | private boolean methodMatchsModelGET(Method method) {
boolean condition = false;
try {
if (isModelCache.contains(method)) {
condition = true;
return condition;
}
String mehtodName = method.getName();
if (method.getReturnType() == null)
return condition; // 无返回值,不做缓存
Class retu... | [
"private",
"boolean",
"methodMatchsModelGET",
"(",
"Method",
"method",
")",
"{",
"boolean",
"condition",
"=",
"false",
";",
"try",
"{",
"if",
"(",
"isModelCache",
".",
"contains",
"(",
"method",
")",
")",
"{",
"condition",
"=",
"true",
";",
"return",
"cond... | 1.check return type if is Model 2.check method name if include "get" 3.
if found them, cache this method
@param method
Method
@return boolean | [
"1",
".",
"check",
"return",
"type",
"if",
"is",
"Model",
"2",
".",
"check",
"method",
"name",
"if",
"include",
"get",
"3",
".",
"if",
"found",
"them",
"cache",
"this",
"method"
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/aop/interceptor/CacheInterceptor.java#L103-L136 |
23,651 | banq/jdonframework | src/main/java/com/jdon/util/jdom/XMLProperties.java | XMLProperties.getProperty | public String getProperty(String name) {
if (propertyCache.containsKey(name)) {
return (String) propertyCache.get(name);
}
String[] propName = parsePropertyName(name);
// Search for this property by traversing down the XML heirarchy.
Element element = doc.getRootElement();
for (int i = 0; i < pr... | java | public String getProperty(String name) {
if (propertyCache.containsKey(name)) {
return (String) propertyCache.get(name);
}
String[] propName = parsePropertyName(name);
// Search for this property by traversing down the XML heirarchy.
Element element = doc.getRootElement();
for (int i = 0; i < pr... | [
"public",
"String",
"getProperty",
"(",
"String",
"name",
")",
"{",
"if",
"(",
"propertyCache",
".",
"containsKey",
"(",
"name",
")",
")",
"{",
"return",
"(",
"String",
")",
"propertyCache",
".",
"get",
"(",
"name",
")",
";",
"}",
"String",
"[",
"]",
... | Returns the value of the specified property.
@param name
the name of the property to get.
@return the value of the specified property. | [
"Returns",
"the",
"value",
"of",
"the",
"specified",
"property",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/jdom/XMLProperties.java#L95-L122 |
23,652 | banq/jdonframework | src/main/java/com/jdon/util/jdom/XMLProperties.java | XMLProperties.setProperty | public void setProperty(String name, String value) {
// Set cache correctly with prop name and value.
propertyCache.put(name, value);
String[] propName = parsePropertyName(name);
// Search for this property by traversing down the XML heirarchy.
Element element = doc.getRootElement();
for (int i = 0;... | java | public void setProperty(String name, String value) {
// Set cache correctly with prop name and value.
propertyCache.put(name, value);
String[] propName = parsePropertyName(name);
// Search for this property by traversing down the XML heirarchy.
Element element = doc.getRootElement();
for (int i = 0;... | [
"public",
"void",
"setProperty",
"(",
"String",
"name",
",",
"String",
"value",
")",
"{",
"// Set cache correctly with prop name and value.\r",
"propertyCache",
".",
"put",
"(",
"name",
",",
"value",
")",
";",
"String",
"[",
"]",
"propName",
"=",
"parsePropertyNam... | Sets the value of the specified property. If the property doesn't
currently exist, it will be automatically created.
@param name
the name of the property to set.
@param value
the new value for the property. | [
"Sets",
"the",
"value",
"of",
"the",
"specified",
"property",
".",
"If",
"the",
"property",
"doesn",
"t",
"currently",
"exist",
"it",
"will",
"be",
"automatically",
"created",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/jdom/XMLProperties.java#L188-L206 |
23,653 | banq/jdonframework | src/main/java/com/jdon/util/jdom/XMLProperties.java | XMLProperties.deleteProperty | public void deleteProperty(String name) {
String[] propName = parsePropertyName(name);
// Search for this property by traversing down the XML heirarchy.
Element element = doc.getRootElement();
for (int i = 0; i < propName.length - 1; i++) {
element = element.getChild(propName[i]);
// Can't find the ... | java | public void deleteProperty(String name) {
String[] propName = parsePropertyName(name);
// Search for this property by traversing down the XML heirarchy.
Element element = doc.getRootElement();
for (int i = 0; i < propName.length - 1; i++) {
element = element.getChild(propName[i]);
// Can't find the ... | [
"public",
"void",
"deleteProperty",
"(",
"String",
"name",
")",
"{",
"String",
"[",
"]",
"propName",
"=",
"parsePropertyName",
"(",
"name",
")",
";",
"// Search for this property by traversing down the XML heirarchy.\r",
"Element",
"element",
"=",
"doc",
".",
"getRoot... | Deletes the specified property.
@param name
the property to delete. | [
"Deletes",
"the",
"specified",
"property",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/jdom/XMLProperties.java#L214-L228 |
23,654 | banq/jdonframework | src/main/java/com/jdon/util/jdom/XMLProperties.java | XMLProperties.parsePropertyName | private String[] parsePropertyName(String name) {
// Figure out the number of parts of the name (this becomes the size
// of the resulting array).
int size = 1;
for (int i = 0; i < name.length(); i++) {
if (name.charAt(i) == '.') {
size++;
}
}
String[] propName = new String[size];
// U... | java | private String[] parsePropertyName(String name) {
// Figure out the number of parts of the name (this becomes the size
// of the resulting array).
int size = 1;
for (int i = 0; i < name.length(); i++) {
if (name.charAt(i) == '.') {
size++;
}
}
String[] propName = new String[size];
// U... | [
"private",
"String",
"[",
"]",
"parsePropertyName",
"(",
"String",
"name",
")",
"{",
"// Figure out the number of parts of the name (this becomes the size\r",
"// of the resulting array).\r",
"int",
"size",
"=",
"1",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
... | Returns an array representation of the given Jive property. Jive
properties are always in the format "prop.name.is.this" which would be
represented as an array of four Strings.
@param name
the name of the Jive property.
@return an array representation of the given Jive property. | [
"Returns",
"an",
"array",
"representation",
"of",
"the",
"given",
"Jive",
"property",
".",
"Jive",
"properties",
"are",
"always",
"in",
"the",
"format",
"prop",
".",
"name",
".",
"is",
".",
"this",
"which",
"would",
"be",
"represented",
"as",
"an",
"array"... | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/jdom/XMLProperties.java#L239-L257 |
23,655 | banq/jdonframework | src/main/java/com/jdon/util/UtilValidate.java | UtilValidate.isWhitespace | public static boolean isWhitespace(String s) {
// Is s empty?
if (isEmpty(s)) return true;
// Search through string's characters one by one
// until we find a non-whitespace character.
// When we do, return false; if we don't, return true.
for (int i = 0; i < s.le... | java | public static boolean isWhitespace(String s) {
// Is s empty?
if (isEmpty(s)) return true;
// Search through string's characters one by one
// until we find a non-whitespace character.
// When we do, return false; if we don't, return true.
for (int i = 0; i < s.le... | [
"public",
"static",
"boolean",
"isWhitespace",
"(",
"String",
"s",
")",
"{",
"// Is s empty?\r",
"if",
"(",
"isEmpty",
"(",
"s",
")",
")",
"return",
"true",
";",
"// Search through string's characters one by one\r",
"// until we find a non-whitespace character.\r",
"// Wh... | Returns true if string s is empty or whitespace characters only. | [
"Returns",
"true",
"if",
"string",
"s",
"is",
"empty",
"or",
"whitespace",
"characters",
"only",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/UtilValidate.java#L209-L224 |
23,656 | banq/jdonframework | src/main/java/com/jdon/util/UtilValidate.java | UtilValidate.stripCharsInBag | public static String stripCharsInBag(String s, String bag) {
int i;
String returnString = "";
// Search through string's characters one by one.
// If character is not in bag, append to returnString.
for (i = 0; i < s.length(); i++) {
char c = s.charAt(i);
... | java | public static String stripCharsInBag(String s, String bag) {
int i;
String returnString = "";
// Search through string's characters one by one.
// If character is not in bag, append to returnString.
for (i = 0; i < s.length(); i++) {
char c = s.charAt(i);
... | [
"public",
"static",
"String",
"stripCharsInBag",
"(",
"String",
"s",
",",
"String",
"bag",
")",
"{",
"int",
"i",
";",
"String",
"returnString",
"=",
"\"\"",
";",
"// Search through string's characters one by one.\r",
"// If character is not in bag, append to returnString.\r... | Removes all characters which appear in string bag from string s. | [
"Removes",
"all",
"characters",
"which",
"appear",
"in",
"string",
"bag",
"from",
"string",
"s",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/UtilValidate.java#L227-L239 |
23,657 | banq/jdonframework | src/main/java/com/jdon/util/UtilValidate.java | UtilValidate.isInteger | public static boolean isInteger(String s) {
if (isEmpty(s)) return defaultEmptyOK;
// Search through string's characters one by one
// until we find a non-numeric character.
// When we do, return false; if we don't, return true.
for (int i = 0; i < s.length(); i++) {
... | java | public static boolean isInteger(String s) {
if (isEmpty(s)) return defaultEmptyOK;
// Search through string's characters one by one
// until we find a non-numeric character.
// When we do, return false; if we don't, return true.
for (int i = 0; i < s.length(); i++) {
... | [
"public",
"static",
"boolean",
"isInteger",
"(",
"String",
"s",
")",
"{",
"if",
"(",
"isEmpty",
"(",
"s",
")",
")",
"return",
"defaultEmptyOK",
";",
"// Search through string's characters one by one\r",
"// until we find a non-numeric character.\r",
"// When we do, return f... | Returns true if all characters in string s are numbers.
Accepts non-signed integers only. Does not accept floating
point, exponential notation, etc. | [
"Returns",
"true",
"if",
"all",
"characters",
"in",
"string",
"s",
"are",
"numbers",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/UtilValidate.java#L305-L320 |
23,658 | banq/jdonframework | src/main/java/com/jdon/util/UtilValidate.java | UtilValidate.isNonnegativeInteger | public static boolean isNonnegativeInteger(String s) {
if (isEmpty(s)) return defaultEmptyOK;
try {
int temp = Integer.parseInt(s);
if (temp >= 0) return true;
return false;
} catch (Exception e) {
return false;
}
// ... | java | public static boolean isNonnegativeInteger(String s) {
if (isEmpty(s)) return defaultEmptyOK;
try {
int temp = Integer.parseInt(s);
if (temp >= 0) return true;
return false;
} catch (Exception e) {
return false;
}
// ... | [
"public",
"static",
"boolean",
"isNonnegativeInteger",
"(",
"String",
"s",
")",
"{",
"if",
"(",
"isEmpty",
"(",
"s",
")",
")",
"return",
"defaultEmptyOK",
";",
"try",
"{",
"int",
"temp",
"=",
"Integer",
".",
"parseInt",
"(",
"s",
")",
";",
"if",
"(",
... | Returns true if string s is an integer >= 0. | [
"Returns",
"true",
"if",
"string",
"s",
"is",
"an",
"integer",
">",
"=",
"0",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/UtilValidate.java#L383-L397 |
23,659 | banq/jdonframework | src/main/java/com/jdon/util/UtilValidate.java | UtilValidate.isAlphabetic | public static boolean isAlphabetic(String s) {
if (isEmpty(s)) return defaultEmptyOK;
// Search through string's characters one by one
// until we find a non-alphabetic character.
// When we do, return false; if we don't, return true.
for (int i = 0; i < s.length(); i++) {... | java | public static boolean isAlphabetic(String s) {
if (isEmpty(s)) return defaultEmptyOK;
// Search through string's characters one by one
// until we find a non-alphabetic character.
// When we do, return false; if we don't, return true.
for (int i = 0; i < s.length(); i++) {... | [
"public",
"static",
"boolean",
"isAlphabetic",
"(",
"String",
"s",
")",
"{",
"if",
"(",
"isEmpty",
"(",
"s",
")",
")",
"return",
"defaultEmptyOK",
";",
"// Search through string's characters one by one\r",
"// until we find a non-alphabetic character.\r",
"// When we do, re... | Returns true if string s is letters only.
NOTE: This should handle i18n version to support European characters, etc.
since it now uses Character.isLetter() | [
"Returns",
"true",
"if",
"string",
"s",
"is",
"letters",
"only",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/UtilValidate.java#L518-L534 |
23,660 | banq/jdonframework | src/main/java/com/jdon/util/UtilValidate.java | UtilValidate.isSSN | public static boolean isSSN(String s) {
if (isEmpty(s)) return defaultEmptyOK;
String normalizedSSN = stripCharsInBag(s, SSNDelimiters);
return (isInteger(normalizedSSN) && normalizedSSN.length() == digitsInSocialSecurityNumber);
} | java | public static boolean isSSN(String s) {
if (isEmpty(s)) return defaultEmptyOK;
String normalizedSSN = stripCharsInBag(s, SSNDelimiters);
return (isInteger(normalizedSSN) && normalizedSSN.length() == digitsInSocialSecurityNumber);
} | [
"public",
"static",
"boolean",
"isSSN",
"(",
"String",
"s",
")",
"{",
"if",
"(",
"isEmpty",
"(",
"s",
")",
")",
"return",
"defaultEmptyOK",
";",
"String",
"normalizedSSN",
"=",
"stripCharsInBag",
"(",
"s",
",",
"SSNDelimiters",
")",
";",
"return",
"(",
"... | isSSN returns true if string s is a valid U.S. Social Security Number. Must be 9 digits. | [
"isSSN",
"returns",
"true",
"if",
"string",
"s",
"is",
"a",
"valid",
"U",
".",
"S",
".",
"Social",
"Security",
"Number",
".",
"Must",
"be",
"9",
"digits",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/UtilValidate.java#L562-L568 |
23,661 | banq/jdonframework | src/main/java/com/jdon/util/UtilValidate.java | UtilValidate.isUSPhoneNumber | public static boolean isUSPhoneNumber(String s) {
if (isEmpty(s)) return defaultEmptyOK;
String normalizedPhone = stripCharsInBag(s, phoneNumberDelimiters);
return (isInteger(normalizedPhone) && normalizedPhone.length() == digitsInUSPhoneNumber);
} | java | public static boolean isUSPhoneNumber(String s) {
if (isEmpty(s)) return defaultEmptyOK;
String normalizedPhone = stripCharsInBag(s, phoneNumberDelimiters);
return (isInteger(normalizedPhone) && normalizedPhone.length() == digitsInUSPhoneNumber);
} | [
"public",
"static",
"boolean",
"isUSPhoneNumber",
"(",
"String",
"s",
")",
"{",
"if",
"(",
"isEmpty",
"(",
"s",
")",
")",
"return",
"defaultEmptyOK",
";",
"String",
"normalizedPhone",
"=",
"stripCharsInBag",
"(",
"s",
",",
"phoneNumberDelimiters",
")",
";",
... | isUSPhoneNumber returns true if string s is a valid U.S. Phone Number. Must be 10 digits. | [
"isUSPhoneNumber",
"returns",
"true",
"if",
"string",
"s",
"is",
"a",
"valid",
"U",
".",
"S",
".",
"Phone",
"Number",
".",
"Must",
"be",
"10",
"digits",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/UtilValidate.java#L571-L576 |
23,662 | banq/jdonframework | src/main/java/com/jdon/util/UtilValidate.java | UtilValidate.isUSPhoneAreaCode | public static boolean isUSPhoneAreaCode(String s) {
if (isEmpty(s)) return defaultEmptyOK;
String normalizedPhone = stripCharsInBag(s, phoneNumberDelimiters);
return (isInteger(normalizedPhone) && normalizedPhone.length() == digitsInUSPhoneAreaCode);
} | java | public static boolean isUSPhoneAreaCode(String s) {
if (isEmpty(s)) return defaultEmptyOK;
String normalizedPhone = stripCharsInBag(s, phoneNumberDelimiters);
return (isInteger(normalizedPhone) && normalizedPhone.length() == digitsInUSPhoneAreaCode);
} | [
"public",
"static",
"boolean",
"isUSPhoneAreaCode",
"(",
"String",
"s",
")",
"{",
"if",
"(",
"isEmpty",
"(",
"s",
")",
")",
"return",
"defaultEmptyOK",
";",
"String",
"normalizedPhone",
"=",
"stripCharsInBag",
"(",
"s",
",",
"phoneNumberDelimiters",
")",
";",
... | isUSPhoneAreaCode returns true if string s is a valid U.S. Phone Area Code. Must be 3 digits. | [
"isUSPhoneAreaCode",
"returns",
"true",
"if",
"string",
"s",
"is",
"a",
"valid",
"U",
".",
"S",
".",
"Phone",
"Area",
"Code",
".",
"Must",
"be",
"3",
"digits",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/UtilValidate.java#L579-L584 |
23,663 | banq/jdonframework | src/main/java/com/jdon/util/UtilValidate.java | UtilValidate.isUSPhoneMainNumber | public static boolean isUSPhoneMainNumber(String s) {
if (isEmpty(s)) return defaultEmptyOK;
String normalizedPhone = stripCharsInBag(s, phoneNumberDelimiters);
return (isInteger(normalizedPhone) && normalizedPhone.length() == digitsInUSPhoneMainNumber);
} | java | public static boolean isUSPhoneMainNumber(String s) {
if (isEmpty(s)) return defaultEmptyOK;
String normalizedPhone = stripCharsInBag(s, phoneNumberDelimiters);
return (isInteger(normalizedPhone) && normalizedPhone.length() == digitsInUSPhoneMainNumber);
} | [
"public",
"static",
"boolean",
"isUSPhoneMainNumber",
"(",
"String",
"s",
")",
"{",
"if",
"(",
"isEmpty",
"(",
"s",
")",
")",
"return",
"defaultEmptyOK",
";",
"String",
"normalizedPhone",
"=",
"stripCharsInBag",
"(",
"s",
",",
"phoneNumberDelimiters",
")",
";"... | isUSPhoneMainNumber returns true if string s is a valid U.S. Phone Main Number. Must be 7 digits. | [
"isUSPhoneMainNumber",
"returns",
"true",
"if",
"string",
"s",
"is",
"a",
"valid",
"U",
".",
"S",
".",
"Phone",
"Main",
"Number",
".",
"Must",
"be",
"7",
"digits",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/UtilValidate.java#L587-L592 |
23,664 | banq/jdonframework | src/main/java/com/jdon/util/UtilValidate.java | UtilValidate.isInternationalPhoneNumber | public static boolean isInternationalPhoneNumber(String s) {
if (isEmpty(s)) return defaultEmptyOK;
String normalizedPhone = stripCharsInBag(s, phoneNumberDelimiters);
return isPositiveInteger(normalizedPhone);
} | java | public static boolean isInternationalPhoneNumber(String s) {
if (isEmpty(s)) return defaultEmptyOK;
String normalizedPhone = stripCharsInBag(s, phoneNumberDelimiters);
return isPositiveInteger(normalizedPhone);
} | [
"public",
"static",
"boolean",
"isInternationalPhoneNumber",
"(",
"String",
"s",
")",
"{",
"if",
"(",
"isEmpty",
"(",
"s",
")",
")",
"return",
"defaultEmptyOK",
";",
"String",
"normalizedPhone",
"=",
"stripCharsInBag",
"(",
"s",
",",
"phoneNumberDelimiters",
")"... | isInternationalPhoneNumber returns true if string s is a valid
international phone number. Must be digits only; any length OK.
May be prefixed by + character. | [
"isInternationalPhoneNumber",
"returns",
"true",
"if",
"string",
"s",
"is",
"a",
"valid",
"international",
"phone",
"number",
".",
"Must",
"be",
"digits",
"only",
";",
"any",
"length",
"OK",
".",
"May",
"be",
"prefixed",
"by",
"+",
"character",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/UtilValidate.java#L598-L604 |
23,665 | banq/jdonframework | src/main/java/com/jdon/util/UtilValidate.java | UtilValidate.isZipCode | public static boolean isZipCode(String s) {
if (isEmpty(s)) return defaultEmptyOK;
String normalizedZip = stripCharsInBag(s, ZipCodeDelimiters);
return (isInteger(normalizedZip) && ((normalizedZip.length() == digitsInZipCode1) || (normalizedZip.length() == digitsInZipCode2)));
} | java | public static boolean isZipCode(String s) {
if (isEmpty(s)) return defaultEmptyOK;
String normalizedZip = stripCharsInBag(s, ZipCodeDelimiters);
return (isInteger(normalizedZip) && ((normalizedZip.length() == digitsInZipCode1) || (normalizedZip.length() == digitsInZipCode2)));
} | [
"public",
"static",
"boolean",
"isZipCode",
"(",
"String",
"s",
")",
"{",
"if",
"(",
"isEmpty",
"(",
"s",
")",
")",
"return",
"defaultEmptyOK",
";",
"String",
"normalizedZip",
"=",
"stripCharsInBag",
"(",
"s",
",",
"ZipCodeDelimiters",
")",
";",
"return",
... | isZIPCode returns true if string s is a valid U.S. ZIP code. Must be 5 or 9 digits only. | [
"isZIPCode",
"returns",
"true",
"if",
"string",
"s",
"is",
"a",
"valid",
"U",
".",
"S",
".",
"ZIP",
"code",
".",
"Must",
"be",
"5",
"or",
"9",
"digits",
"only",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/UtilValidate.java#L607-L613 |
23,666 | banq/jdonframework | src/main/java/com/jdon/util/UtilValidate.java | UtilValidate.isContiguousZipCode | public static boolean isContiguousZipCode(String s) {
boolean retval = false;
if (isZipCode(s)) {
if (isEmpty(s)) retval = defaultEmptyOK;
else {
String normalizedZip = s.substring(0,5);
int iZip = Integer.parseInt(normalizedZip);
... | java | public static boolean isContiguousZipCode(String s) {
boolean retval = false;
if (isZipCode(s)) {
if (isEmpty(s)) retval = defaultEmptyOK;
else {
String normalizedZip = s.substring(0,5);
int iZip = Integer.parseInt(normalizedZip);
... | [
"public",
"static",
"boolean",
"isContiguousZipCode",
"(",
"String",
"s",
")",
"{",
"boolean",
"retval",
"=",
"false",
";",
"if",
"(",
"isZipCode",
"(",
"s",
")",
")",
"{",
"if",
"(",
"isEmpty",
"(",
"s",
")",
")",
"retval",
"=",
"defaultEmptyOK",
";",... | Returns true if string s is a valid contiguous U.S. Zip code. Must be 5 or 9 digits only. | [
"Returns",
"true",
"if",
"string",
"s",
"is",
"a",
"valid",
"contiguous",
"U",
".",
"S",
".",
"Zip",
"code",
".",
"Must",
"be",
"5",
"or",
"9",
"digits",
"only",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/UtilValidate.java#L616-L628 |
23,667 | banq/jdonframework | src/main/java/com/jdon/util/UtilValidate.java | UtilValidate.isEmail | public static boolean isEmail(String s) {
if (isEmpty(s)) return defaultEmptyOK;
// is s whitespace?
if (isWhitespace(s)) return false;
// there must be >= 1 character before @, so we
// start looking at character position 1
// (i.e. second character)
i... | java | public static boolean isEmail(String s) {
if (isEmpty(s)) return defaultEmptyOK;
// is s whitespace?
if (isWhitespace(s)) return false;
// there must be >= 1 character before @, so we
// start looking at character position 1
// (i.e. second character)
i... | [
"public",
"static",
"boolean",
"isEmail",
"(",
"String",
"s",
")",
"{",
"if",
"(",
"isEmpty",
"(",
"s",
")",
")",
"return",
"defaultEmptyOK",
";",
"// is s whitespace?\r",
"if",
"(",
"isWhitespace",
"(",
"s",
")",
")",
"return",
"false",
";",
"// there mus... | Email address must be of form a@b.c -- in other words:
- there must be at least one character before the @
- there must be at least one character before and after the .
- the characters @ and . are both required | [
"Email",
"address",
"must",
"be",
"of",
"form",
"a"
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/UtilValidate.java#L647-L676 |
23,668 | banq/jdonframework | src/main/java/com/jdon/util/UtilValidate.java | UtilValidate.isYear | public static boolean isYear(String s) {
if (isEmpty(s)) return defaultEmptyOK;
if (!isNonnegativeInteger(s)) return false;
return ((s.length() == 2) || (s.length() == 4));
} | java | public static boolean isYear(String s) {
if (isEmpty(s)) return defaultEmptyOK;
if (!isNonnegativeInteger(s)) return false;
return ((s.length() == 2) || (s.length() == 4));
} | [
"public",
"static",
"boolean",
"isYear",
"(",
"String",
"s",
")",
"{",
"if",
"(",
"isEmpty",
"(",
"s",
")",
")",
"return",
"defaultEmptyOK",
";",
"if",
"(",
"!",
"isNonnegativeInteger",
"(",
"s",
")",
")",
"return",
"false",
";",
"return",
"(",
"(",
... | isYear returns true if string s is a valid
Year number. Must be 2 or 4 digits only.
For Year 2000 compliance, you are advised
to use 4-digit year numbers everywhere. | [
"isYear",
"returns",
"true",
"if",
"string",
"s",
"is",
"a",
"valid",
"Year",
"number",
".",
"Must",
"be",
"2",
"or",
"4",
"digits",
"only",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/UtilValidate.java#L684-L689 |
23,669 | banq/jdonframework | src/main/java/com/jdon/util/UtilValidate.java | UtilValidate.isIntegerInRange | public static boolean isIntegerInRange(String s, int a, int b) {
if (isEmpty(s)) return defaultEmptyOK;
// Catch non-integer strings to avoid creating a NaN below,
// which isn't available on JavaScript 1.0 for Windows.
if (!isSignedInteger(s)) return false;
// Now, explicit... | java | public static boolean isIntegerInRange(String s, int a, int b) {
if (isEmpty(s)) return defaultEmptyOK;
// Catch non-integer strings to avoid creating a NaN below,
// which isn't available on JavaScript 1.0 for Windows.
if (!isSignedInteger(s)) return false;
// Now, explicit... | [
"public",
"static",
"boolean",
"isIntegerInRange",
"(",
"String",
"s",
",",
"int",
"a",
",",
"int",
"b",
")",
"{",
"if",
"(",
"isEmpty",
"(",
"s",
")",
")",
"return",
"defaultEmptyOK",
";",
"// Catch non-integer strings to avoid creating a NaN below,\r",
"// which... | isIntegerInRange returns true if string s is an integer
within the range of integer arguments a and b, inclusive. | [
"isIntegerInRange",
"returns",
"true",
"if",
"string",
"s",
"is",
"an",
"integer",
"within",
"the",
"range",
"of",
"integer",
"arguments",
"a",
"and",
"b",
"inclusive",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/UtilValidate.java#L694-L706 |
23,670 | banq/jdonframework | src/main/java/com/jdon/util/UtilValidate.java | UtilValidate.isDate | public static boolean isDate(String year, String month, String day) {
// catch invalid years(not 2- or 4-digit) and invalid months and days.
if (!(isYear(year) && isMonth(month) && isDay(day))) return false;
int intYear = Integer.parseInt(year);
int intMonth = Integer.parseInt(mont... | java | public static boolean isDate(String year, String month, String day) {
// catch invalid years(not 2- or 4-digit) and invalid months and days.
if (!(isYear(year) && isMonth(month) && isDay(day))) return false;
int intYear = Integer.parseInt(year);
int intMonth = Integer.parseInt(mont... | [
"public",
"static",
"boolean",
"isDate",
"(",
"String",
"year",
",",
"String",
"month",
",",
"String",
"day",
")",
"{",
"// catch invalid years(not 2- or 4-digit) and invalid months and days.\r",
"if",
"(",
"!",
"(",
"isYear",
"(",
"year",
")",
"&&",
"isMonth",
"(... | isDate returns true if string arguments year, month, and day form a valid date. | [
"isDate",
"returns",
"true",
"if",
"string",
"arguments",
"year",
"month",
"and",
"day",
"form",
"a",
"valid",
"date",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/UtilValidate.java#L746-L758 |
23,671 | banq/jdonframework | src/main/java/com/jdon/util/UtilValidate.java | UtilValidate.isDate | public static boolean isDate(String date) {
if (isEmpty(date)) return defaultEmptyOK;
String month;
String day;
String year;
int dateSlash1 = date.indexOf("/");
int dateSlash2 = date.lastIndexOf("/");
if (dateSlash1 <= 0 || dateSlash1 == dateSlash2) ret... | java | public static boolean isDate(String date) {
if (isEmpty(date)) return defaultEmptyOK;
String month;
String day;
String year;
int dateSlash1 = date.indexOf("/");
int dateSlash2 = date.lastIndexOf("/");
if (dateSlash1 <= 0 || dateSlash1 == dateSlash2) ret... | [
"public",
"static",
"boolean",
"isDate",
"(",
"String",
"date",
")",
"{",
"if",
"(",
"isEmpty",
"(",
"date",
")",
")",
"return",
"defaultEmptyOK",
";",
"String",
"month",
";",
"String",
"day",
";",
"String",
"year",
";",
"int",
"dateSlash1",
"=",
"date",... | isDate returns true if string argument date forms a valid date. | [
"isDate",
"returns",
"true",
"if",
"string",
"argument",
"date",
"forms",
"a",
"valid",
"date",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/UtilValidate.java#L761-L776 |
23,672 | banq/jdonframework | src/main/java/com/jdon/util/UtilValidate.java | UtilValidate.isDateAfterToday | public static boolean isDateAfterToday(String date) {
if (isEmpty(date)) return defaultEmptyOK;
int dateSlash1 = date.indexOf("/");
int dateSlash2 = date.lastIndexOf("/");
if (dateSlash1 <= 0) return false;
java.util.Date passed = null;
if (dateSlash1 == dateSla... | java | public static boolean isDateAfterToday(String date) {
if (isEmpty(date)) return defaultEmptyOK;
int dateSlash1 = date.indexOf("/");
int dateSlash2 = date.lastIndexOf("/");
if (dateSlash1 <= 0) return false;
java.util.Date passed = null;
if (dateSlash1 == dateSla... | [
"public",
"static",
"boolean",
"isDateAfterToday",
"(",
"String",
"date",
")",
"{",
"if",
"(",
"isEmpty",
"(",
"date",
")",
")",
"return",
"defaultEmptyOK",
";",
"int",
"dateSlash1",
"=",
"date",
".",
"indexOf",
"(",
"\"/\"",
")",
";",
"int",
"dateSlash2",... | isDate returns true if string argument date forms a valid date and is after today. | [
"isDate",
"returns",
"true",
"if",
"string",
"argument",
"date",
"forms",
"a",
"valid",
"date",
"and",
"is",
"after",
"today",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/UtilValidate.java#L779-L818 |
23,673 | banq/jdonframework | src/main/java/com/jdon/util/UtilValidate.java | UtilValidate.isTime | public static boolean isTime(String hour, String minute, String second) {
// catch invalid years(not 2- or 4-digit) and invalid months and days.
if (isHour(hour) && isMinute(minute) && isSecond(second))
return true;
else
return false;
} | java | public static boolean isTime(String hour, String minute, String second) {
// catch invalid years(not 2- or 4-digit) and invalid months and days.
if (isHour(hour) && isMinute(minute) && isSecond(second))
return true;
else
return false;
} | [
"public",
"static",
"boolean",
"isTime",
"(",
"String",
"hour",
",",
"String",
"minute",
",",
"String",
"second",
")",
"{",
"// catch invalid years(not 2- or 4-digit) and invalid months and days.\r",
"if",
"(",
"isHour",
"(",
"hour",
")",
"&&",
"isMinute",
"(",
"min... | isTime returns true if string arguments hour, minute, and second form a valid time. | [
"isTime",
"returns",
"true",
"if",
"string",
"arguments",
"hour",
"minute",
"and",
"second",
"form",
"a",
"valid",
"time",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/UtilValidate.java#L821-L827 |
23,674 | banq/jdonframework | src/main/java/com/jdon/util/UtilValidate.java | UtilValidate.isTime | public static boolean isTime(String time) {
if (isEmpty(time)) return defaultEmptyOK;
String hour;
String minute;
String second;
int timeColon1 = time.indexOf(":");
int timeColon2 = time.lastIndexOf(":");
if (timeColon1 <= 0) return false;
ho... | java | public static boolean isTime(String time) {
if (isEmpty(time)) return defaultEmptyOK;
String hour;
String minute;
String second;
int timeColon1 = time.indexOf(":");
int timeColon2 = time.lastIndexOf(":");
if (timeColon1 <= 0) return false;
ho... | [
"public",
"static",
"boolean",
"isTime",
"(",
"String",
"time",
")",
"{",
"if",
"(",
"isEmpty",
"(",
"time",
")",
")",
"return",
"defaultEmptyOK",
";",
"String",
"hour",
";",
"String",
"minute",
";",
"String",
"second",
";",
"int",
"timeColon1",
"=",
"ti... | isTime returns true if string argument time forms a valid time. | [
"isTime",
"returns",
"true",
"if",
"string",
"argument",
"time",
"forms",
"a",
"valid",
"time",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/UtilValidate.java#L830-L850 |
23,675 | banq/jdonframework | src/main/java/com/jdon/util/UtilValidate.java | UtilValidate.isCreditCard | public static boolean isCreditCard(String stPassed) {
if (isEmpty(stPassed)) return defaultEmptyOK;
String st = stripCharsInBag(stPassed, creditCardDelimiters);
int sum = 0;
int mul = 1;
int l = st.length();
// Encoding only works on cards with less than 19 digi... | java | public static boolean isCreditCard(String stPassed) {
if (isEmpty(stPassed)) return defaultEmptyOK;
String st = stripCharsInBag(stPassed, creditCardDelimiters);
int sum = 0;
int mul = 1;
int l = st.length();
// Encoding only works on cards with less than 19 digi... | [
"public",
"static",
"boolean",
"isCreditCard",
"(",
"String",
"stPassed",
")",
"{",
"if",
"(",
"isEmpty",
"(",
"stPassed",
")",
")",
"return",
"defaultEmptyOK",
";",
"String",
"st",
"=",
"stripCharsInBag",
"(",
"stPassed",
",",
"creditCardDelimiters",
")",
";"... | Checks credit card number with Luhn Mod-10 test
@param stPassed a string representing a credit card number
@return true, if the credit card number passes the Luhn Mod-10 test, false otherwise | [
"Checks",
"credit",
"card",
"number",
"with",
"Luhn",
"Mod",
"-",
"10",
"test"
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/UtilValidate.java#L857-L899 |
23,676 | banq/jdonframework | src/main/java/com/jdon/util/UtilValidate.java | UtilValidate.isVisa | public static boolean isVisa(String cc) {
if (((cc.length() == 16) || (cc.length() == 13)) && (cc.substring(0, 1).equals("4")))
return isCreditCard(cc);
return false;
} | java | public static boolean isVisa(String cc) {
if (((cc.length() == 16) || (cc.length() == 13)) && (cc.substring(0, 1).equals("4")))
return isCreditCard(cc);
return false;
} | [
"public",
"static",
"boolean",
"isVisa",
"(",
"String",
"cc",
")",
"{",
"if",
"(",
"(",
"(",
"cc",
".",
"length",
"(",
")",
"==",
"16",
")",
"||",
"(",
"cc",
".",
"length",
"(",
")",
"==",
"13",
")",
")",
"&&",
"(",
"cc",
".",
"substring",
"(... | Checks to see if the cc number is a valid Visa number
@param cc a string representing a credit card number; Sample number: 4111 1111 1111 1111(16 digits)
@return true, if the credit card number is a valid VISA number, false otherwise | [
"Checks",
"to",
"see",
"if",
"the",
"cc",
"number",
"is",
"a",
"valid",
"Visa",
"number"
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/UtilValidate.java#L906-L910 |
23,677 | banq/jdonframework | src/main/java/com/jdon/util/UtilValidate.java | UtilValidate.isMasterCard | public static boolean isMasterCard(String cc) {
int firstdig = Integer.parseInt(cc.substring(0, 1));
int seconddig = Integer.parseInt(cc.substring(1, 2));
if ((cc.length() == 16) && (firstdig == 5) && ((seconddig >= 1) && (seconddig <= 5)))
return isCreditCard(cc);
ret... | java | public static boolean isMasterCard(String cc) {
int firstdig = Integer.parseInt(cc.substring(0, 1));
int seconddig = Integer.parseInt(cc.substring(1, 2));
if ((cc.length() == 16) && (firstdig == 5) && ((seconddig >= 1) && (seconddig <= 5)))
return isCreditCard(cc);
ret... | [
"public",
"static",
"boolean",
"isMasterCard",
"(",
"String",
"cc",
")",
"{",
"int",
"firstdig",
"=",
"Integer",
".",
"parseInt",
"(",
"cc",
".",
"substring",
"(",
"0",
",",
"1",
")",
")",
";",
"int",
"seconddig",
"=",
"Integer",
".",
"parseInt",
"(",
... | Checks to see if the cc number is a valid Master Card number
@param cc a string representing a credit card number; Sample number: 5500 0000 0000 0004(16 digits)
@return true, if the credit card number is a valid MasterCard number, false otherwise | [
"Checks",
"to",
"see",
"if",
"the",
"cc",
"number",
"is",
"a",
"valid",
"Master",
"Card",
"number"
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/UtilValidate.java#L917-L925 |
23,678 | banq/jdonframework | src/main/java/com/jdon/util/UtilValidate.java | UtilValidate.isDiscover | public static boolean isDiscover(String cc) {
String first4digs = cc.substring(0, 4);
if ((cc.length() == 16) && (first4digs.equals("6011")))
return isCreditCard(cc);
return false;
} | java | public static boolean isDiscover(String cc) {
String first4digs = cc.substring(0, 4);
if ((cc.length() == 16) && (first4digs.equals("6011")))
return isCreditCard(cc);
return false;
} | [
"public",
"static",
"boolean",
"isDiscover",
"(",
"String",
"cc",
")",
"{",
"String",
"first4digs",
"=",
"cc",
".",
"substring",
"(",
"0",
",",
"4",
")",
";",
"if",
"(",
"(",
"cc",
".",
"length",
"(",
")",
"==",
"16",
")",
"&&",
"(",
"first4digs",
... | Checks to see if the cc number is a valid Discover number
@param cc - a string representing a credit card number; Sample number: 6011000000000004(16 digits)
@return true, if the credit card number is a valid Discover card number, false otherwise | [
"Checks",
"to",
"see",
"if",
"the",
"cc",
"number",
"is",
"a",
"valid",
"Discover",
"number"
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/UtilValidate.java#L966-L972 |
23,679 | banq/jdonframework | src/main/java/com/jdon/util/UtilValidate.java | UtilValidate.isJCB | public static boolean isJCB(String cc) {
String first4digs = cc.substring(0, 4);
if ((cc.length() == 16) &&
(first4digs.equals("3088") ||
first4digs.equals("3096") ||
first4digs.equals("3112") ||
first4digs.equals("3158") ||
... | java | public static boolean isJCB(String cc) {
String first4digs = cc.substring(0, 4);
if ((cc.length() == 16) &&
(first4digs.equals("3088") ||
first4digs.equals("3096") ||
first4digs.equals("3112") ||
first4digs.equals("3158") ||
... | [
"public",
"static",
"boolean",
"isJCB",
"(",
"String",
"cc",
")",
"{",
"String",
"first4digs",
"=",
"cc",
".",
"substring",
"(",
"0",
",",
"4",
")",
";",
"if",
"(",
"(",
"cc",
".",
"length",
"(",
")",
"==",
"16",
")",
"&&",
"(",
"first4digs",
"."... | Checks to see if the cc number is a valid JCB number
@param cc - a string representing a credit card number; Sample number: 3088000000000009(16 digits)
@return true, if the credit card number is a valid JCB card number, false otherwise | [
"Checks",
"to",
"see",
"if",
"the",
"cc",
"number",
"is",
"a",
"valid",
"JCB",
"number"
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/UtilValidate.java#L990-L1002 |
23,680 | banq/jdonframework | src/main/java/com/jdon/util/UtilValidate.java | UtilValidate.isAnyCard | public static boolean isAnyCard(String ccPassed) {
if (isEmpty(ccPassed)) return defaultEmptyOK;
String cc = stripCharsInBag(ccPassed, creditCardDelimiters);
if (!isCreditCard(cc)) return false;
if (isMasterCard(cc) || isVisa(cc) || isAmericanExpress(cc) || isDinersClub(cc) ||
... | java | public static boolean isAnyCard(String ccPassed) {
if (isEmpty(ccPassed)) return defaultEmptyOK;
String cc = stripCharsInBag(ccPassed, creditCardDelimiters);
if (!isCreditCard(cc)) return false;
if (isMasterCard(cc) || isVisa(cc) || isAmericanExpress(cc) || isDinersClub(cc) ||
... | [
"public",
"static",
"boolean",
"isAnyCard",
"(",
"String",
"ccPassed",
")",
"{",
"if",
"(",
"isEmpty",
"(",
"ccPassed",
")",
")",
"return",
"defaultEmptyOK",
";",
"String",
"cc",
"=",
"stripCharsInBag",
"(",
"ccPassed",
",",
"creditCardDelimiters",
")",
";",
... | Checks to see if the cc number is a valid number for any accepted credit card
@param ccPassed - a string representing a credit card number
@return true, if the credit card number is any valid credit card number for any of the accepted card types, false otherwise | [
"Checks",
"to",
"see",
"if",
"the",
"cc",
"number",
"is",
"a",
"valid",
"number",
"for",
"any",
"accepted",
"credit",
"card"
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/UtilValidate.java#L1008-L1018 |
23,681 | banq/jdonframework | src/main/java/com/jdon/util/UtilValidate.java | UtilValidate.getCardType | public static String getCardType(String ccPassed) {
if (isEmpty(ccPassed)) return "Unknown";
String cc = stripCharsInBag(ccPassed, creditCardDelimiters);
if (!isCreditCard(cc)) return "Unknown";
if (isMasterCard(cc)) return "MasterCard";
if (isVisa(cc)) return "Visa";
... | java | public static String getCardType(String ccPassed) {
if (isEmpty(ccPassed)) return "Unknown";
String cc = stripCharsInBag(ccPassed, creditCardDelimiters);
if (!isCreditCard(cc)) return "Unknown";
if (isMasterCard(cc)) return "MasterCard";
if (isVisa(cc)) return "Visa";
... | [
"public",
"static",
"String",
"getCardType",
"(",
"String",
"ccPassed",
")",
"{",
"if",
"(",
"isEmpty",
"(",
"ccPassed",
")",
")",
"return",
"\"Unknown\"",
";",
"String",
"cc",
"=",
"stripCharsInBag",
"(",
"ccPassed",
",",
"creditCardDelimiters",
")",
";",
"... | Checks to see if the cc number is a valid number for any accepted credit card, and return the name of that type
@param ccPassed - a string representing a credit card number
@return true, if the credit card number is any valid credit card number for any of the accepted card types, false otherwise | [
"Checks",
"to",
"see",
"if",
"the",
"cc",
"number",
"is",
"a",
"valid",
"number",
"for",
"any",
"accepted",
"credit",
"card",
"and",
"return",
"the",
"name",
"of",
"that",
"type"
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/UtilValidate.java#L1024-L1038 |
23,682 | banq/jdonframework | src/main/java/com/jdon/util/UtilValidate.java | UtilValidate.isCardMatch | public static boolean isCardMatch(String cardType, String cardNumberPassed) {
if (isEmpty(cardType)) return defaultEmptyOK;
if (isEmpty(cardNumberPassed)) return defaultEmptyOK;
String cardNumber = stripCharsInBag(cardNumberPassed, creditCardDelimiters);
if ((cardType.equalsIgnoreC... | java | public static boolean isCardMatch(String cardType, String cardNumberPassed) {
if (isEmpty(cardType)) return defaultEmptyOK;
if (isEmpty(cardNumberPassed)) return defaultEmptyOK;
String cardNumber = stripCharsInBag(cardNumberPassed, creditCardDelimiters);
if ((cardType.equalsIgnoreC... | [
"public",
"static",
"boolean",
"isCardMatch",
"(",
"String",
"cardType",
",",
"String",
"cardNumberPassed",
")",
"{",
"if",
"(",
"isEmpty",
"(",
"cardType",
")",
")",
"return",
"defaultEmptyOK",
";",
"if",
"(",
"isEmpty",
"(",
"cardNumberPassed",
")",
")",
"... | Checks to see if the cc number is a valid number for the specified type
@param cardType - a string representing the credit card type
@param cardNumberPassed - a string representing a credit card number
@return true, if the credit card number is valid for the particular credit card type given in "cardType", false... | [
"Checks",
"to",
"see",
"if",
"the",
"cc",
"number",
"is",
"a",
"valid",
"number",
"for",
"the",
"specified",
"type"
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/UtilValidate.java#L1045-L1059 |
23,683 | banq/jdonframework | src/main/java/com/jdon/util/UtilValidate.java | UtilValidate.isNotPoBox | public static boolean isNotPoBox(String s) {
if (isEmpty(s)) return defaultEmptyOK;
// strings to check from Greg's program
// "P.O. B"
// "P.o.B"
// "P.O B"
// "PO. B"
// "P O B"
// "PO B"
// "P.0. B"
// "P0 B"
Strin... | java | public static boolean isNotPoBox(String s) {
if (isEmpty(s)) return defaultEmptyOK;
// strings to check from Greg's program
// "P.O. B"
// "P.o.B"
// "P.O B"
// "PO. B"
// "P O B"
// "PO B"
// "P.0. B"
// "P0 B"
Strin... | [
"public",
"static",
"boolean",
"isNotPoBox",
"(",
"String",
"s",
")",
"{",
"if",
"(",
"isEmpty",
"(",
"s",
")",
")",
"return",
"defaultEmptyOK",
";",
"// strings to check from Greg's program\r",
"// \"P.O. B\"\r",
"// \"P.o.B\"\r",
"// \"P.O B\"\r",
"// \"PO. B\"\r",
... | isNotPoBox returns true if address argument does not contain anything that looks like a a PO Box. | [
"isNotPoBox",
"returns",
"true",
"if",
"address",
"argument",
"does",
"not",
"contain",
"anything",
"that",
"looks",
"like",
"a",
"a",
"PO",
"Box",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/UtilValidate.java#L1063-L1096 |
23,684 | banq/jdonframework | JdonAccessory/jdon-remote/src/main/java/com/jdon/bussinessproxy/remote/hessian/HessianToJdonRequestProcessor.java | HessianToJdonRequestProcessor.process | public void process(final String beanName,
final HttpServletRequest request, final HttpServletResponse response)
throws ServletException, IOException {
InputStream is = request.getInputStream();
OutputStream os = response.getOutputStream();
Hessian2Input in = new Hessian2Input(is);
AbstractHessi... | java | public void process(final String beanName,
final HttpServletRequest request, final HttpServletResponse response)
throws ServletException, IOException {
InputStream is = request.getInputStream();
OutputStream os = response.getOutputStream();
Hessian2Input in = new Hessian2Input(is);
AbstractHessi... | [
"public",
"void",
"process",
"(",
"final",
"String",
"beanName",
",",
"final",
"HttpServletRequest",
"request",
",",
"final",
"HttpServletResponse",
"response",
")",
"throws",
"ServletException",
",",
"IOException",
"{",
"InputStream",
"is",
"=",
"request",
".",
"... | Process servlet requests and writes bean's method result to output
@param beanName
String
@param request
HttpServletRequest
@param response
HttpServletResponse
@throws javax.servlet.ServletException
If error occur
@throws java.io.IOException
If error occur | [
"Process",
"servlet",
"requests",
"and",
"writes",
"bean",
"s",
"method",
"result",
"to",
"output"
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-remote/src/main/java/com/jdon/bussinessproxy/remote/hessian/HessianToJdonRequestProcessor.java#L56-L110 |
23,685 | banq/jdonframework | JdonAccessory/jdon-remote/src/main/java/com/jdon/bussinessproxy/remote/hessian/HessianToJdonRequestProcessor.java | HessianToJdonRequestProcessor.readHeaders | public Map readHeaders(Hessian2Input hessian2Input) throws IOException {
Map headers = new HashMap();
String header = hessian2Input.readHeader();
while (header != null) {
headers.put(header, hessian2Input.readObject());
header = hessian2Input.readHeader();
}
return headers;
} | java | public Map readHeaders(Hessian2Input hessian2Input) throws IOException {
Map headers = new HashMap();
String header = hessian2Input.readHeader();
while (header != null) {
headers.put(header, hessian2Input.readObject());
header = hessian2Input.readHeader();
}
return headers;
} | [
"public",
"Map",
"readHeaders",
"(",
"Hessian2Input",
"hessian2Input",
")",
"throws",
"IOException",
"{",
"Map",
"headers",
"=",
"new",
"HashMap",
"(",
")",
";",
"String",
"header",
"=",
"hessian2Input",
".",
"readHeader",
"(",
")",
";",
"while",
"(",
"heade... | Reads headers from call.
@param hessian2Input -
HessianInput
@return Map of headers
@throws java.io.IOException
If error occurs | [
"Reads",
"headers",
"from",
"call",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-remote/src/main/java/com/jdon/bussinessproxy/remote/hessian/HessianToJdonRequestProcessor.java#L185-L193 |
23,686 | banq/jdonframework | JdonAccessory/jdon-remote/src/main/java/com/jdon/bussinessproxy/remote/hessian/HessianToJdonRequestProcessor.java | HessianToJdonRequestProcessor.writeException | protected void writeException(final AbstractHessianOutput out, Exception ex)
throws IOException {
OutputStream os = new ByteArrayOutputStream();
ex.printStackTrace(new PrintStream(os));
out.writeFault(ex.getClass().toString(), os.toString(), null);
} | java | protected void writeException(final AbstractHessianOutput out, Exception ex)
throws IOException {
OutputStream os = new ByteArrayOutputStream();
ex.printStackTrace(new PrintStream(os));
out.writeFault(ex.getClass().toString(), os.toString(), null);
} | [
"protected",
"void",
"writeException",
"(",
"final",
"AbstractHessianOutput",
"out",
",",
"Exception",
"ex",
")",
"throws",
"IOException",
"{",
"OutputStream",
"os",
"=",
"new",
"ByteArrayOutputStream",
"(",
")",
";",
"ex",
".",
"printStackTrace",
"(",
"new",
"P... | Writes Exception information to Hessian Output.
@param out
Hessian Output
@param ex
Exception
@throws java.io.IOException
If i/o error occur | [
"Writes",
"Exception",
"information",
"to",
"Hessian",
"Output",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-remote/src/main/java/com/jdon/bussinessproxy/remote/hessian/HessianToJdonRequestProcessor.java#L205-L210 |
23,687 | banq/jdonframework | src/main/java/com/jdon/container/pico/PicoContainerWrapper.java | PicoContainerWrapper.getComponentNewInstance | public Object getComponentNewInstance(String name) {
Debug.logVerbose("[JdonFramework]getComponentNewInstance: name=" + name, module);
ComponentAdapter componentAdapter = container.getComponentAdapter(name);
if (componentAdapter == null) {
Debug.logWarning("[JdonFramework]Not find the component in containe... | java | public Object getComponentNewInstance(String name) {
Debug.logVerbose("[JdonFramework]getComponentNewInstance: name=" + name, module);
ComponentAdapter componentAdapter = container.getComponentAdapter(name);
if (componentAdapter == null) {
Debug.logWarning("[JdonFramework]Not find the component in containe... | [
"public",
"Object",
"getComponentNewInstance",
"(",
"String",
"name",
")",
"{",
"Debug",
".",
"logVerbose",
"(",
"\"[JdonFramework]getComponentNewInstance: name=\"",
"+",
"name",
",",
"module",
")",
";",
"ComponentAdapter",
"componentAdapter",
"=",
"container",
".",
"... | This method will usually create a new instance each time it is called
@param name
component name
@return object new instance | [
"This",
"method",
"will",
"usually",
"create",
"a",
"new",
"instance",
"each",
"time",
"it",
"is",
"called"
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/container/pico/PicoContainerWrapper.java#L209-L217 |
23,688 | banq/jdonframework | JdonAccessory/jdon-struts1x/src/main/java/com/jdon/model/ModelHandlerManagerImp.java | ModelHandlerManagerImp.borrowtHandlerObject | public ModelHandler borrowtHandlerObject(String formName) {
ModelHandler modelHandler = null;
try {
modelHandler = handlerObjectFactory.borrowHandlerObject(formName);
modelHandler.setModelMapping(modelFactory.getModelMapping(formName));
} catch (Exception ex) {
Debug.logError("[JdonFramework]can't ... | java | public ModelHandler borrowtHandlerObject(String formName) {
ModelHandler modelHandler = null;
try {
modelHandler = handlerObjectFactory.borrowHandlerObject(formName);
modelHandler.setModelMapping(modelFactory.getModelMapping(formName));
} catch (Exception ex) {
Debug.logError("[JdonFramework]can't ... | [
"public",
"ModelHandler",
"borrowtHandlerObject",
"(",
"String",
"formName",
")",
"{",
"ModelHandler",
"modelHandler",
"=",
"null",
";",
"try",
"{",
"modelHandler",
"=",
"handlerObjectFactory",
".",
"borrowHandlerObject",
"(",
"formName",
")",
";",
"modelHandler",
"... | borrow a Handler instance from Modelhandler pool | [
"borrow",
"a",
"Handler",
"instance",
"from",
"Modelhandler",
"pool"
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-struts1x/src/main/java/com/jdon/model/ModelHandlerManagerImp.java#L54-L64 |
23,689 | banq/jdonframework | JdonAccessory/jdon-struts1x/src/main/java/com/jdon/model/ModelHandlerManagerImp.java | ModelHandlerManagerImp.returnHandlerObject | public void returnHandlerObject(ModelHandler modelHandler) {
if (modelHandler == null)
return;
try {
handlerObjectFactory.returnHandlerObject(modelHandler);
} catch (Exception ex) {
Debug.logError("[JdonFramework] return modelHandler error" + ex, module);
}
} | java | public void returnHandlerObject(ModelHandler modelHandler) {
if (modelHandler == null)
return;
try {
handlerObjectFactory.returnHandlerObject(modelHandler);
} catch (Exception ex) {
Debug.logError("[JdonFramework] return modelHandler error" + ex, module);
}
} | [
"public",
"void",
"returnHandlerObject",
"(",
"ModelHandler",
"modelHandler",
")",
"{",
"if",
"(",
"modelHandler",
"==",
"null",
")",
"return",
";",
"try",
"{",
"handlerObjectFactory",
".",
"returnHandlerObject",
"(",
"modelHandler",
")",
";",
"}",
"catch",
"(",... | return the Handler instance. | [
"return",
"the",
"Handler",
"instance",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-struts1x/src/main/java/com/jdon/model/ModelHandlerManagerImp.java#L70-L79 |
23,690 | banq/jdonframework | JdonAccessory/jdon-struts1x/src/main/java/com/jdon/model/ModelHandlerManagerImp.java | ModelHandlerManagerImp.makeModelObject | private Object makeModelObject(String formName) {
Object object = null;
Class modelClass = null;
try {
modelClass = (Class) modelFactory.getModelClasses(formName);
if (modelClass == null) {
throw new Exception(" not found the model in config xml, formName=" + formName);
}
object = modelCla... | java | private Object makeModelObject(String formName) {
Object object = null;
Class modelClass = null;
try {
modelClass = (Class) modelFactory.getModelClasses(formName);
if (modelClass == null) {
throw new Exception(" not found the model in config xml, formName=" + formName);
}
object = modelCla... | [
"private",
"Object",
"makeModelObject",
"(",
"String",
"formName",
")",
"{",
"Object",
"object",
"=",
"null",
";",
"Class",
"modelClass",
"=",
"null",
";",
"try",
"{",
"modelClass",
"=",
"(",
"Class",
")",
"modelFactory",
".",
"getModelClasses",
"(",
"formNa... | create model instance from the model class that read from the xml
configure.
@param formName
@return
@throws Exception | [
"create",
"model",
"instance",
"from",
"the",
"model",
"class",
"that",
"read",
"from",
"the",
"xml",
"configure",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-struts1x/src/main/java/com/jdon/model/ModelHandlerManagerImp.java#L99-L114 |
23,691 | banq/jdonframework | JdonAccessory/jdon-hibernate3x/src/main/java/com/jdon/controller/model/PageIterator.java | PageIterator.hasNext | public boolean hasNext() {
if (currentIndex == endIndex) {
return false;
}
// Otherwise, see if nextElement is null. If so, try to load the next
// element to make sure it exists.
if (nextElement == null) {
nextElement = getNextEleme... | java | public boolean hasNext() {
if (currentIndex == endIndex) {
return false;
}
// Otherwise, see if nextElement is null. If so, try to load the next
// element to make sure it exists.
if (nextElement == null) {
nextElement = getNextEleme... | [
"public",
"boolean",
"hasNext",
"(",
")",
"{",
"if",
"(",
"currentIndex",
"==",
"endIndex",
")",
"{",
"return",
"false",
";",
"}",
"// Otherwise, see if nextElement is null. If so, try to load the next\r",
"// element to make sure it exists.\r",
"if",
"(",
"nextElement",
... | Returns true if there are more elements in the iteration.
@return true if the iterator has more elements. | [
"Returns",
"true",
"if",
"there",
"are",
"more",
"elements",
"in",
"the",
"iteration",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-hibernate3x/src/main/java/com/jdon/controller/model/PageIterator.java#L213-L227 |
23,692 | banq/jdonframework | JdonAccessory/jdon-hibernate3x/src/main/java/com/jdon/controller/model/PageIterator.java | PageIterator.next | public Object next() throws java.util.NoSuchElementException {
Object element = null;
if (nextElement != null) {
element = nextElement;
nextElement = null;
} else {
element = getNextElement();
if (element == null) {
throw ne... | java | public Object next() throws java.util.NoSuchElementException {
Object element = null;
if (nextElement != null) {
element = nextElement;
nextElement = null;
} else {
element = getNextElement();
if (element == null) {
throw ne... | [
"public",
"Object",
"next",
"(",
")",
"throws",
"java",
".",
"util",
".",
"NoSuchElementException",
"{",
"Object",
"element",
"=",
"null",
";",
"if",
"(",
"nextElement",
"!=",
"null",
")",
"{",
"element",
"=",
"nextElement",
";",
"nextElement",
"=",
"null"... | Returns the next element of primary key collection.
@return the next element.
@throws NoSuchElementException
if there are no more elements. | [
"Returns",
"the",
"next",
"element",
"of",
"primary",
"key",
"collection",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-hibernate3x/src/main/java/com/jdon/controller/model/PageIterator.java#L236-L248 |
23,693 | banq/jdonframework | JdonAccessory/jdon-hibernate3x/src/main/java/com/jdon/controller/model/PageIterator.java | PageIterator.hasPrevious | public boolean hasPrevious() {
// If we are at the start of the list there are no previous elements.
if (currentIndex == startIndex) {
return false;
}
// Otherwise, see if previous Element is null. If so, try to load the
// previous element to make sure it exist... | java | public boolean hasPrevious() {
// If we are at the start of the list there are no previous elements.
if (currentIndex == startIndex) {
return false;
}
// Otherwise, see if previous Element is null. If so, try to load the
// previous element to make sure it exist... | [
"public",
"boolean",
"hasPrevious",
"(",
")",
"{",
"// If we are at the start of the list there are no previous elements.\r",
"if",
"(",
"currentIndex",
"==",
"startIndex",
")",
"{",
"return",
"false",
";",
"}",
"// Otherwise, see if previous Element is null. If so, try to load t... | Returns true if there are previous elements in the iteration.
@return | [
"Returns",
"true",
"if",
"there",
"are",
"previous",
"elements",
"in",
"the",
"iteration",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-hibernate3x/src/main/java/com/jdon/controller/model/PageIterator.java#L255-L270 |
23,694 | banq/jdonframework | JdonAccessory/jdon-hibernate3x/src/main/java/com/jdon/controller/model/PageIterator.java | PageIterator.getPreviousElement | private Object getPreviousElement() {
Object element = null;
while (currentIndex >= startIndex && element == null) {
currentIndex--;
element = getElement();
}
return element;
} | java | private Object getPreviousElement() {
Object element = null;
while (currentIndex >= startIndex && element == null) {
currentIndex--;
element = getElement();
}
return element;
} | [
"private",
"Object",
"getPreviousElement",
"(",
")",
"{",
"Object",
"element",
"=",
"null",
";",
"while",
"(",
"currentIndex",
">=",
"startIndex",
"&&",
"element",
"==",
"null",
")",
"{",
"currentIndex",
"--",
";",
"element",
"=",
"getElement",
"(",
")",
"... | Returns the previous element, or null if there are no more elements to
return.
@return the previous element. | [
"Returns",
"the",
"previous",
"element",
"or",
"null",
"if",
"there",
"are",
"no",
"more",
"elements",
"to",
"return",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-hibernate3x/src/main/java/com/jdon/controller/model/PageIterator.java#L297-L304 |
23,695 | banq/jdonframework | JdonAccessory/jdon-hibernate3x/src/main/java/com/jdon/controller/model/PageIterator.java | PageIterator.getNextElement | public Object getNextElement() {
Object element = null;
while (currentIndex+1 < endIndex && element == null) {
currentIndex++;
element = getElement();
}
return element;
} | java | public Object getNextElement() {
Object element = null;
while (currentIndex+1 < endIndex && element == null) {
currentIndex++;
element = getElement();
}
return element;
} | [
"public",
"Object",
"getNextElement",
"(",
")",
"{",
"Object",
"element",
"=",
"null",
";",
"while",
"(",
"currentIndex",
"+",
"1",
"<",
"endIndex",
"&&",
"element",
"==",
"null",
")",
"{",
"currentIndex",
"++",
";",
"element",
"=",
"getElement",
"(",
")... | Returns the next available element of primary key collection, or null if
there are no more elements to return.
@return the next available element. | [
"Returns",
"the",
"next",
"available",
"element",
"of",
"primary",
"key",
"collection",
"or",
"null",
"if",
"there",
"are",
"no",
"more",
"elements",
"to",
"return",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-hibernate3x/src/main/java/com/jdon/controller/model/PageIterator.java#L319-L326 |
23,696 | banq/jdonframework | src/main/java/com/jdon/util/jdom/DataUnformatFilter.java | DataUnformatFilter.emitWhitespace | protected void emitWhitespace() throws SAXException {
char[] data = new char[whitespace.length()];
whitespace.getChars(0, data.length, data, 0);
whitespace.setLength(0);
super.characters(data, 0, data.length);
} | java | protected void emitWhitespace() throws SAXException {
char[] data = new char[whitespace.length()];
whitespace.getChars(0, data.length, data, 0);
whitespace.setLength(0);
super.characters(data, 0, data.length);
} | [
"protected",
"void",
"emitWhitespace",
"(",
")",
"throws",
"SAXException",
"{",
"char",
"[",
"]",
"data",
"=",
"new",
"char",
"[",
"whitespace",
".",
"length",
"(",
")",
"]",
";",
"whitespace",
".",
"getChars",
"(",
"0",
",",
"data",
".",
"length",
","... | Passes saved whitespace down the filter chain. | [
"Passes",
"saved",
"whitespace",
"down",
"the",
"filter",
"chain",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/jdom/DataUnformatFilter.java#L280-L285 |
23,697 | banq/jdonframework | src/main/java/com/jdon/controller/cache/CacheKey.java | CacheKey.getKey | public String getKey() {
StringBuilder buffer = new StringBuilder(cacheType);
buffer.append(dataTypeName);
if (dataKey != null)
buffer.append(dataKey.toString());
return buffer.toString().intern();
} | java | public String getKey() {
StringBuilder buffer = new StringBuilder(cacheType);
buffer.append(dataTypeName);
if (dataKey != null)
buffer.append(dataKey.toString());
return buffer.toString().intern();
} | [
"public",
"String",
"getKey",
"(",
")",
"{",
"StringBuilder",
"buffer",
"=",
"new",
"StringBuilder",
"(",
"cacheType",
")",
";",
"buffer",
".",
"append",
"(",
"dataTypeName",
")",
";",
"if",
"(",
"dataKey",
"!=",
"null",
")",
"buffer",
".",
"append",
"("... | cacheType + dataTypeName + dataKey | [
"cacheType",
"+",
"dataTypeName",
"+",
"dataKey"
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/controller/cache/CacheKey.java#L49-L55 |
23,698 | banq/jdonframework | src/main/java/com/jdon/util/jdom/XMLFilterBase.java | XMLFilterBase.startElement | public void startElement (String uri, String localName)
throws SAXException
{
startElement(uri, localName, "", EMPTY_ATTS);
} | java | public void startElement (String uri, String localName)
throws SAXException
{
startElement(uri, localName, "", EMPTY_ATTS);
} | [
"public",
"void",
"startElement",
"(",
"String",
"uri",
",",
"String",
"localName",
")",
"throws",
"SAXException",
"{",
"startElement",
"(",
"uri",
",",
"localName",
",",
"\"\"",
",",
"EMPTY_ATTS",
")",
";",
"}"
] | Start a new element without a qname or attributes.
<p>This method will provide a default empty attribute
list and an empty string for the qualified name. It invokes
{@link #startElement(String, String, String, Attributes)}
directly.</p>
@param uri The element's Namespace URI.
@param localName The element's local name... | [
"Start",
"a",
"new",
"element",
"without",
"a",
"qname",
"or",
"attributes",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/jdom/XMLFilterBase.java#L168-L172 |
23,699 | banq/jdonframework | src/main/java/com/jdon/util/jdom/XMLFilterBase.java | XMLFilterBase.emptyElement | public void emptyElement (String uri, String localName,
String qName, Attributes atts)
throws SAXException
{
startElement(uri, localName, qName, atts);
endElement(uri, localName, qName);
} | java | public void emptyElement (String uri, String localName,
String qName, Attributes atts)
throws SAXException
{
startElement(uri, localName, qName, atts);
endElement(uri, localName, qName);
} | [
"public",
"void",
"emptyElement",
"(",
"String",
"uri",
",",
"String",
"localName",
",",
"String",
"qName",
",",
"Attributes",
"atts",
")",
"throws",
"SAXException",
"{",
"startElement",
"(",
"uri",
",",
"localName",
",",
"qName",
",",
"atts",
")",
";",
"e... | Add an empty element.
Both a {@link #startElement startElement} and an
{@link #endElement endElement} event will be passed on down
the filter chain.
@param uri The element's Namespace URI, or the empty string
if the element has no Namespace or if Namespace
processing is not being performed.
@param localName The eleme... | [
"Add",
"an",
"empty",
"element",
"."
] | 72b451caac04f775e57f52aaed3d8775044ead53 | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/jdom/XMLFilterBase.java#L280-L286 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.