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
152,600
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/filter/StartSearchFilter.java
StartSearchFilter.fakeTheDate
public void fakeTheDate() { int ecErrorCode; BaseField fldToCompare = m_fldToCompare; // Cache this in case it is changed if (m_fldToCompare.isNull()) return; // Don't convert the date if this is NULL! if (m_fldFakeDate == null) m_fldFakeDate = new DateField...
java
public void fakeTheDate() { int ecErrorCode; BaseField fldToCompare = m_fldToCompare; // Cache this in case it is changed if (m_fldToCompare.isNull()) return; // Don't convert the date if this is NULL! if (m_fldFakeDate == null) m_fldFakeDate = new DateField...
[ "public", "void", "fakeTheDate", "(", ")", "{", "int", "ecErrorCode", ";", "BaseField", "fldToCompare", "=", "m_fldToCompare", ";", "// Cache this in case it is changed", "if", "(", "m_fldToCompare", ".", "isNull", "(", ")", ")", "return", ";", "// Don't convert the...
If the current key starts with a date, convert the search field to a date and compare.
[ "If", "the", "current", "key", "starts", "with", "a", "date", "convert", "the", "search", "field", "to", "a", "date", "and", "compare", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/filter/StartSearchFilter.java#L126-L145
152,601
jbundle/jbundle
base/screen/model/src/main/java/org/jbundle/base/screen/model/report/ReportBreakScreen.java
ReportBreakScreen.isBreak
public boolean isBreak() { if (this.getMainRecord() != null) if ((this.getMainRecord().getEditMode() != DBConstants.EDIT_CURRENT) && (this.getMainRecord().getEditMode() != DBConstants.EDIT_IN_PROGRESS)) { // End of file if ((m_iDisplayFieldDesc & HtmlCon...
java
public boolean isBreak() { if (this.getMainRecord() != null) if ((this.getMainRecord().getEditMode() != DBConstants.EDIT_CURRENT) && (this.getMainRecord().getEditMode() != DBConstants.EDIT_IN_PROGRESS)) { // End of file if ((m_iDisplayFieldDesc & HtmlCon...
[ "public", "boolean", "isBreak", "(", ")", "{", "if", "(", "this", ".", "getMainRecord", "(", ")", "!=", "null", ")", "if", "(", "(", "this", ".", "getMainRecord", "(", ")", ".", "getEditMode", "(", ")", "!=", "DBConstants", ".", "EDIT_CURRENT", ")", ...
Is this a control break? @return True if it is a break.
[ "Is", "this", "a", "control", "break?" ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/model/src/main/java/org/jbundle/base/screen/model/report/ReportBreakScreen.java#L136-L160
152,602
FitLayout/classify
src/main/java/org/fit/layout/classify/StyleCounter.java
StyleCounter.add
public void add(T style) { Integer cnt = styles.get(style); if (cnt == null) styles.put(style, 1); else styles.put(style, cnt+1); }
java
public void add(T style) { Integer cnt = styles.get(style); if (cnt == null) styles.put(style, 1); else styles.put(style, cnt+1); }
[ "public", "void", "add", "(", "T", "style", ")", "{", "Integer", "cnt", "=", "styles", ".", "get", "(", "style", ")", ";", "if", "(", "cnt", "==", "null", ")", "styles", ".", "put", "(", "style", ",", "1", ")", ";", "else", "styles", ".", "put"...
Adds a new occurence to the counter. @param style The style to be added.
[ "Adds", "a", "new", "occurence", "to", "the", "counter", "." ]
0b43ceb2f0be4e6d26263491893884d811f0d605
https://github.com/FitLayout/classify/blob/0b43ceb2f0be4e6d26263491893884d811f0d605/src/main/java/org/fit/layout/classify/StyleCounter.java#L40-L47
152,603
FitLayout/classify
src/main/java/org/fit/layout/classify/StyleCounter.java
StyleCounter.getCount
public int getCount(T style) { Integer cnt = styles.get(style); return cnt == null ? 0 : cnt; }
java
public int getCount(T style) { Integer cnt = styles.get(style); return cnt == null ? 0 : cnt; }
[ "public", "int", "getCount", "(", "T", "style", ")", "{", "Integer", "cnt", "=", "styles", ".", "get", "(", "style", ")", ";", "return", "cnt", "==", "null", "?", "0", ":", "cnt", ";", "}" ]
Obtains total registered number of occurences of the given style. @param style the style whose number of occurences should be returned @return
[ "Obtains", "total", "registered", "number", "of", "occurences", "of", "the", "given", "style", "." ]
0b43ceb2f0be4e6d26263491893884d811f0d605
https://github.com/FitLayout/classify/blob/0b43ceb2f0be4e6d26263491893884d811f0d605/src/main/java/org/fit/layout/classify/StyleCounter.java#L54-L58
152,604
FitLayout/classify
src/main/java/org/fit/layout/classify/StyleCounter.java
StyleCounter.getMaximalFrequency
public int getMaximalFrequency() { int maxfreq = 0; for (Map.Entry<T, Integer> entry : styles.entrySet()) { if (entry.getValue() > maxfreq) maxfreq = entry.getValue(); } return maxfreq; }
java
public int getMaximalFrequency() { int maxfreq = 0; for (Map.Entry<T, Integer> entry : styles.entrySet()) { if (entry.getValue() > maxfreq) maxfreq = entry.getValue(); } return maxfreq; }
[ "public", "int", "getMaximalFrequency", "(", ")", "{", "int", "maxfreq", "=", "0", ";", "for", "(", "Map", ".", "Entry", "<", "T", ",", "Integer", ">", "entry", ":", "styles", ".", "entrySet", "(", ")", ")", "{", "if", "(", "entry", ".", "getValue"...
Gets the number of the most frequent entry. @return the number of occurences of the most frequent entry
[ "Gets", "the", "number", "of", "the", "most", "frequent", "entry", "." ]
0b43ceb2f0be4e6d26263491893884d811f0d605
https://github.com/FitLayout/classify/blob/0b43ceb2f0be4e6d26263491893884d811f0d605/src/main/java/org/fit/layout/classify/StyleCounter.java#L64-L73
152,605
FitLayout/classify
src/main/java/org/fit/layout/classify/StyleCounter.java
StyleCounter.getMostFrequent
public T getMostFrequent() { T ret = null; int freq = 0; for (Map.Entry<T, Integer> entry : styles.entrySet()) { if (entry.getValue() > freq) { ret = entry.getKey(); freq = entry.getValue(); } } retur...
java
public T getMostFrequent() { T ret = null; int freq = 0; for (Map.Entry<T, Integer> entry : styles.entrySet()) { if (entry.getValue() > freq) { ret = entry.getKey(); freq = entry.getValue(); } } retur...
[ "public", "T", "getMostFrequent", "(", ")", "{", "T", "ret", "=", "null", ";", "int", "freq", "=", "0", ";", "for", "(", "Map", ".", "Entry", "<", "T", ",", "Integer", ">", "entry", ":", "styles", ".", "entrySet", "(", ")", ")", "{", "if", "(",...
Obtains the most frequent style. If there are multiple styles with the same frequency then only one of them is returned. @return The most frequent style or {@code null} when the counter is empty.
[ "Obtains", "the", "most", "frequent", "style", ".", "If", "there", "are", "multiple", "styles", "with", "the", "same", "frequency", "then", "only", "one", "of", "them", "is", "returned", "." ]
0b43ceb2f0be4e6d26263491893884d811f0d605
https://github.com/FitLayout/classify/blob/0b43ceb2f0be4e6d26263491893884d811f0d605/src/main/java/org/fit/layout/classify/StyleCounter.java#L80-L93
152,606
FitLayout/classify
src/main/java/org/fit/layout/classify/StyleCounter.java
StyleCounter.getMostFrequentAll
public List<T> getMostFrequentAll() { List<T> ret = new ArrayList<T>(); int maxfreq = getMaximalFrequency(); for (Map.Entry<T, Integer> entry : styles.entrySet()) { if (entry.getValue() == maxfreq) ret.add(entry.getKey()); } return ret; ...
java
public List<T> getMostFrequentAll() { List<T> ret = new ArrayList<T>(); int maxfreq = getMaximalFrequency(); for (Map.Entry<T, Integer> entry : styles.entrySet()) { if (entry.getValue() == maxfreq) ret.add(entry.getKey()); } return ret; ...
[ "public", "List", "<", "T", ">", "getMostFrequentAll", "(", ")", "{", "List", "<", "T", ">", "ret", "=", "new", "ArrayList", "<", "T", ">", "(", ")", ";", "int", "maxfreq", "=", "getMaximalFrequency", "(", ")", ";", "for", "(", "Map", ".", "Entry",...
Obtains the most frequent style or styles when multiple of them have the maximal frequency. @return The list of styles with the maximal frequency.
[ "Obtains", "the", "most", "frequent", "style", "or", "styles", "when", "multiple", "of", "them", "have", "the", "maximal", "frequency", "." ]
0b43ceb2f0be4e6d26263491893884d811f0d605
https://github.com/FitLayout/classify/blob/0b43ceb2f0be4e6d26263491893884d811f0d605/src/main/java/org/fit/layout/classify/StyleCounter.java#L99-L109
152,607
FitLayout/classify
src/main/java/org/fit/layout/classify/StyleCounter.java
StyleCounter.getAllSorted
public Map<T, Integer> getAllSorted() { Map<T, Integer> map = styles; TreeMap<T, Integer> smap = new TreeMap<T, Integer>(new StyleCountComparator(map)); smap.putAll(map); return smap; }
java
public Map<T, Integer> getAllSorted() { Map<T, Integer> map = styles; TreeMap<T, Integer> smap = new TreeMap<T, Integer>(new StyleCountComparator(map)); smap.putAll(map); return smap; }
[ "public", "Map", "<", "T", ",", "Integer", ">", "getAllSorted", "(", ")", "{", "Map", "<", "T", ",", "Integer", ">", "map", "=", "styles", ";", "TreeMap", "<", "T", ",", "Integer", ">", "smap", "=", "new", "TreeMap", "<", "T", ",", "Integer", ">"...
Obtains all the registered styles and their frequencies, sorted by frequency. @return A map that assigns a frequency to each unique style.
[ "Obtains", "all", "the", "registered", "styles", "and", "their", "frequencies", "sorted", "by", "frequency", "." ]
0b43ceb2f0be4e6d26263491893884d811f0d605
https://github.com/FitLayout/classify/blob/0b43ceb2f0be4e6d26263491893884d811f0d605/src/main/java/org/fit/layout/classify/StyleCounter.java#L162-L168
152,608
FitLayout/classify
src/main/java/org/fit/layout/classify/StyleCounter.java
StyleCounter.getPercentage
public double getPercentage(T style) { int scnt = 0; int allcnt = 0; for (Map.Entry<T, Integer> entry : getAll().entrySet()) { if (entry.getKey().equals(style)) scnt = entry.getValue(); allcnt += entry.getValue(); } return scnt ...
java
public double getPercentage(T style) { int scnt = 0; int allcnt = 0; for (Map.Entry<T, Integer> entry : getAll().entrySet()) { if (entry.getKey().equals(style)) scnt = entry.getValue(); allcnt += entry.getValue(); } return scnt ...
[ "public", "double", "getPercentage", "(", "T", "style", ")", "{", "int", "scnt", "=", "0", ";", "int", "allcnt", "=", "0", ";", "for", "(", "Map", ".", "Entry", "<", "T", ",", "Integer", ">", "entry", ":", "getAll", "(", ")", ".", "entrySet", "("...
Computes the percentage of the given style among all the style occurences. @param style the style @return the style percentage
[ "Computes", "the", "percentage", "of", "the", "given", "style", "among", "all", "the", "style", "occurences", "." ]
0b43ceb2f0be4e6d26263491893884d811f0d605
https://github.com/FitLayout/classify/blob/0b43ceb2f0be4e6d26263491893884d811f0d605/src/main/java/org/fit/layout/classify/StyleCounter.java#L175-L186
152,609
jbundle/jbundle
thin/base/db/base/src/main/java/org/jbundle/thin/base/db/mem/base/PDatabase.java
PDatabase.getPDBTypeFromDBType
public static char getPDBTypeFromDBType(int iDatabaseType) { char strPDBType = ThinPhysicalDatabase.MEMORY_TYPE; if ((iDatabaseType & Constants.MAPPED) != 0) ; iDatabaseType = iDatabaseType & Constants.TABLE_TYPE_MASK; if (iDatabaseType == Constants.LOCAL) str...
java
public static char getPDBTypeFromDBType(int iDatabaseType) { char strPDBType = ThinPhysicalDatabase.MEMORY_TYPE; if ((iDatabaseType & Constants.MAPPED) != 0) ; iDatabaseType = iDatabaseType & Constants.TABLE_TYPE_MASK; if (iDatabaseType == Constants.LOCAL) str...
[ "public", "static", "char", "getPDBTypeFromDBType", "(", "int", "iDatabaseType", ")", "{", "char", "strPDBType", "=", "ThinPhysicalDatabase", ".", "MEMORY_TYPE", ";", "if", "(", "(", "iDatabaseType", "&", "Constants", ".", "MAPPED", ")", "!=", "0", ")", ";", ...
Get the physical db type from the record db type. @param iDatabaseType @return
[ "Get", "the", "physical", "db", "type", "from", "the", "record", "db", "type", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/db/base/src/main/java/org/jbundle/thin/base/db/mem/base/PDatabase.java#L169-L182
152,610
jbundle/jbundle
thin/base/db/base/src/main/java/org/jbundle/thin/base/db/mem/base/PDatabase.java
PDatabase.addPTable
public void addPTable(PTable physicalTable) { Object strKey = physicalTable.getLookupKey(); m_htTableList.put(strKey, physicalTable); this.getPDatabaseParent().addTableToCache(physicalTable); // If cache is on }
java
public void addPTable(PTable physicalTable) { Object strKey = physicalTable.getLookupKey(); m_htTableList.put(strKey, physicalTable); this.getPDatabaseParent().addTableToCache(physicalTable); // If cache is on }
[ "public", "void", "addPTable", "(", "PTable", "physicalTable", ")", "{", "Object", "strKey", "=", "physicalTable", ".", "getLookupKey", "(", ")", ";", "m_htTableList", ".", "put", "(", "strKey", ",", "physicalTable", ")", ";", "this", ".", "getPDatabaseParent"...
Add this raw data table to my table list. @param physicalTable The raw data table to add.
[ "Add", "this", "raw", "data", "table", "to", "my", "table", "list", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/db/base/src/main/java/org/jbundle/thin/base/db/mem/base/PDatabase.java#L216-L221
152,611
jbundle/jbundle
thin/base/db/base/src/main/java/org/jbundle/thin/base/db/mem/base/PDatabase.java
PDatabase.removePDatabaseOwner
public int removePDatabaseOwner(ThinPhysicalDatabaseOwner pDatabaseOwner, boolean bFreeIfEmpty) { m_setPDatabaseOwners.remove(pDatabaseOwner); if (bFreeIfEmpty) if (m_setPDatabaseOwners.size() == 0) if (m_htTableList.size() == 0) { this.free(); ...
java
public int removePDatabaseOwner(ThinPhysicalDatabaseOwner pDatabaseOwner, boolean bFreeIfEmpty) { m_setPDatabaseOwners.remove(pDatabaseOwner); if (bFreeIfEmpty) if (m_setPDatabaseOwners.size() == 0) if (m_htTableList.size() == 0) { this.free(); ...
[ "public", "int", "removePDatabaseOwner", "(", "ThinPhysicalDatabaseOwner", "pDatabaseOwner", ",", "boolean", "bFreeIfEmpty", ")", "{", "m_setPDatabaseOwners", ".", "remove", "(", "pDatabaseOwner", ")", ";", "if", "(", "bFreeIfEmpty", ")", "if", "(", "m_setPDatabaseOwn...
Remove this physical database owner. @param pDatabaseOwner @return
[ "Remove", "this", "physical", "database", "owner", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/db/base/src/main/java/org/jbundle/thin/base/db/mem/base/PDatabase.java#L237-L248
152,612
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/event/FieldScratchHandler.java
FieldScratchHandler.getFieldCopy
public BaseField getFieldCopy() { try { if (m_fldCopy == null) m_fldCopy = (BaseField)this.getOwner().clone(); // Make a copy } catch (CloneNotSupportedException ex) { m_fldCopy = null; } return m_fldCopy; }
java
public BaseField getFieldCopy() { try { if (m_fldCopy == null) m_fldCopy = (BaseField)this.getOwner().clone(); // Make a copy } catch (CloneNotSupportedException ex) { m_fldCopy = null; } return m_fldCopy; }
[ "public", "BaseField", "getFieldCopy", "(", ")", "{", "try", "{", "if", "(", "m_fldCopy", "==", "null", ")", "m_fldCopy", "=", "(", "BaseField", ")", "this", ".", "getOwner", "(", ")", ".", "clone", "(", ")", ";", "// Make a copy", "}", "catch", "(", ...
Get the field copy. Clone a copy if the copy doesn't exist. @return The field copy.
[ "Get", "the", "field", "copy", ".", "Clone", "a", "copy", "if", "the", "copy", "doesn", "t", "exist", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/event/FieldScratchHandler.java#L73-L82
152,613
tvesalainen/util
util/src/main/java/org/vesalainen/util/AbstractProvisioner.java
AbstractProvisioner.detach
public void detach(Object ob) { Iterator<Map.Entry<String, List<InstanceMethod>>> ki = map.entrySet().iterator(); while (ki.hasNext()) { Map.Entry<String, List<InstanceMethod>> entry = ki.next(); Iterator<InstanceMethod> li = entry.getValue().iterator(); ...
java
public void detach(Object ob) { Iterator<Map.Entry<String, List<InstanceMethod>>> ki = map.entrySet().iterator(); while (ki.hasNext()) { Map.Entry<String, List<InstanceMethod>> entry = ki.next(); Iterator<InstanceMethod> li = entry.getValue().iterator(); ...
[ "public", "void", "detach", "(", "Object", "ob", ")", "{", "Iterator", "<", "Map", ".", "Entry", "<", "String", ",", "List", "<", "InstanceMethod", ">", ">", ">", "ki", "=", "map", ".", "entrySet", "(", ")", ".", "iterator", "(", ")", ";", "while",...
Removes all previously made attachments to given object. @param ob
[ "Removes", "all", "previously", "made", "attachments", "to", "given", "object", "." ]
bba7a44689f638ffabc8be40a75bdc9a33676433
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/AbstractProvisioner.java#L96-L116
152,614
tvesalainen/util
util/src/main/java/org/vesalainen/util/AbstractProvisioner.java
AbstractProvisioner.detach
public void detach(Class<?> cls) { Iterator<Map.Entry<String, List<InstanceMethod>>> ki = map.entrySet().iterator(); while (ki.hasNext()) { Map.Entry<String, List<InstanceMethod>> entry = ki.next(); Iterator<InstanceMethod> li = entry.getValue().iterator(); ...
java
public void detach(Class<?> cls) { Iterator<Map.Entry<String, List<InstanceMethod>>> ki = map.entrySet().iterator(); while (ki.hasNext()) { Map.Entry<String, List<InstanceMethod>> entry = ki.next(); Iterator<InstanceMethod> li = entry.getValue().iterator(); ...
[ "public", "void", "detach", "(", "Class", "<", "?", ">", "cls", ")", "{", "Iterator", "<", "Map", ".", "Entry", "<", "String", ",", "List", "<", "InstanceMethod", ">", ">", ">", "ki", "=", "map", ".", "entrySet", "(", ")", ".", "iterator", "(", "...
Removes all previously made attachments to static class. @param cls
[ "Removes", "all", "previously", "made", "attachments", "to", "static", "class", "." ]
bba7a44689f638ffabc8be40a75bdc9a33676433
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/AbstractProvisioner.java#L121-L141
152,615
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/xmlutil/XmlUtilities.java
XmlUtilities.encodeDateTime
public static String encodeDateTime(DateTimeField field) { Date date = ((DateTimeField)field).getDateTime(); if (date == null) return null; if (field instanceof TimeField) return timeFormat.format(date); else if (field instanceof DateField) return dateFormat.format(date); else // i...
java
public static String encodeDateTime(DateTimeField field) { Date date = ((DateTimeField)field).getDateTime(); if (date == null) return null; if (field instanceof TimeField) return timeFormat.format(date); else if (field instanceof DateField) return dateFormat.format(date); else // i...
[ "public", "static", "String", "encodeDateTime", "(", "DateTimeField", "field", ")", "{", "Date", "date", "=", "(", "(", "DateTimeField", ")", "field", ")", ".", "getDateTime", "(", ")", ";", "if", "(", "date", "==", "null", ")", "return", "null", ";", ...
Encode date time field. @param field @return
[ "Encode", "date", "time", "field", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/xmlutil/XmlUtilities.java#L274-L285
152,616
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/xmlutil/XmlUtilities.java
XmlUtilities.encodeFieldData
public static String encodeFieldData(BaseField field) { if (field.getData() == null) return DBConstants.BLANK; ByteArrayOutputStream baOut = new ByteArrayOutputStream(); DataOutputStream daOut = new DataOutputStream(baOut); try { field.write(daOut, false); ...
java
public static String encodeFieldData(BaseField field) { if (field.getData() == null) return DBConstants.BLANK; ByteArrayOutputStream baOut = new ByteArrayOutputStream(); DataOutputStream daOut = new DataOutputStream(baOut); try { field.write(daOut, false); ...
[ "public", "static", "String", "encodeFieldData", "(", "BaseField", "field", ")", "{", "if", "(", "field", ".", "getData", "(", ")", "==", "null", ")", "return", "DBConstants", ".", "BLANK", ";", "ByteArrayOutputStream", "baOut", "=", "new", "ByteArrayOutputStr...
Change the data in this field to base64. WARNING - This requires 64bit encoding found in javax.mail! @param field The field containing the binary data to encode. @return The string encoded using base64.
[ "Change", "the", "data", "in", "this", "field", "to", "base64", ".", "WARNING", "-", "This", "requires", "64bit", "encoding", "found", "in", "javax", ".", "mail!" ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/xmlutil/XmlUtilities.java#L377-L393
152,617
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/xmlutil/XmlUtilities.java
XmlUtilities.decodeFieldData
public static void decodeFieldData(BaseField field, String string) { if ((string == null) || (string.length() == 0)) return; byte[] ba = Base64.decode(string.toCharArray()); InputStream is = new ByteArrayInputStream(ba); DataInputStream daIn = new DataInputStream(is); ...
java
public static void decodeFieldData(BaseField field, String string) { if ((string == null) || (string.length() == 0)) return; byte[] ba = Base64.decode(string.toCharArray()); InputStream is = new ByteArrayInputStream(ba); DataInputStream daIn = new DataInputStream(is); ...
[ "public", "static", "void", "decodeFieldData", "(", "BaseField", "field", ",", "String", "string", ")", "{", "if", "(", "(", "string", "==", "null", ")", "||", "(", "string", ".", "length", "(", ")", "==", "0", ")", ")", "return", ";", "byte", "[", ...
Change this base64 string to raw data and set the value in this field. WARNING - This requires 64bit encoding found in javax.mail! @param field The field containing the binary data to decode. @param The string to decode using base64.
[ "Change", "this", "base64", "string", "to", "raw", "data", "and", "set", "the", "value", "in", "this", "field", ".", "WARNING", "-", "This", "requires", "64bit", "encoding", "found", "in", "javax", ".", "mail!" ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/xmlutil/XmlUtilities.java#L400-L408
152,618
jbundle/jbundle
model/base/src/main/java/org/jbundle/model/util/Util.java
Util.isNumeric
public static boolean isNumeric(String string, boolean bAllowFormatting) { if ((string == null) || (string.length() == 0)) return false; boolean bIsNumeric = true; for (int i = 0; i < string.length(); i++) { if (!Character.isDigit(string.charAt(i))) ...
java
public static boolean isNumeric(String string, boolean bAllowFormatting) { if ((string == null) || (string.length() == 0)) return false; boolean bIsNumeric = true; for (int i = 0; i < string.length(); i++) { if (!Character.isDigit(string.charAt(i))) ...
[ "public", "static", "boolean", "isNumeric", "(", "String", "string", ",", "boolean", "bAllowFormatting", ")", "{", "if", "(", "(", "string", "==", "null", ")", "||", "(", "string", ".", "length", "(", ")", "==", "0", ")", ")", "return", "false", ";", ...
Is this string a valid number? @param string The string to check. @return true if this string is a valid number (all characters numeric).
[ "Is", "this", "string", "a", "valid", "number?" ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/model/base/src/main/java/org/jbundle/model/util/Util.java#L135-L150
152,619
jbundle/jbundle
model/base/src/main/java/org/jbundle/model/util/Util.java
Util.addXMLMap
public static StringBuffer addXMLMap(StringBuffer sbXML, Map<String,Object> mapMessage) { if (sbXML == null) sbXML = new StringBuffer(); if (mapMessage != null) { for (String strParam : mapMessage.keySet()) { Object objValue = mapMessage.get(strPar...
java
public static StringBuffer addXMLMap(StringBuffer sbXML, Map<String,Object> mapMessage) { if (sbXML == null) sbXML = new StringBuffer(); if (mapMessage != null) { for (String strParam : mapMessage.keySet()) { Object objValue = mapMessage.get(strPar...
[ "public", "static", "StringBuffer", "addXMLMap", "(", "StringBuffer", "sbXML", ",", "Map", "<", "String", ",", "Object", ">", "mapMessage", ")", "{", "if", "(", "sbXML", "==", "null", ")", "sbXML", "=", "new", "StringBuffer", "(", ")", ";", "if", "(", ...
Add this map as an xml string.
[ "Add", "this", "map", "as", "an", "xml", "string", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/model/base/src/main/java/org/jbundle/model/util/Util.java#L297-L311
152,620
jbundle/jbundle
model/base/src/main/java/org/jbundle/model/util/Util.java
Util.getXML
@SuppressWarnings({ "rawtypes", "unchecked" }) public static StringBuffer getXML(StringBuffer sbXML, String strParam, Object objValue) { Util.addStartTag(sbXML, strParam); if (objValue instanceof Map) { Util.addXMLMap(sbXML, (Map)objValue); } else { ...
java
@SuppressWarnings({ "rawtypes", "unchecked" }) public static StringBuffer getXML(StringBuffer sbXML, String strParam, Object objValue) { Util.addStartTag(sbXML, strParam); if (objValue instanceof Map) { Util.addXMLMap(sbXML, (Map)objValue); } else { ...
[ "@", "SuppressWarnings", "(", "{", "\"rawtypes\"", ",", "\"unchecked\"", "}", ")", "public", "static", "StringBuffer", "getXML", "(", "StringBuffer", "sbXML", ",", "String", "strParam", ",", "Object", "objValue", ")", "{", "Util", ".", "addStartTag", "(", "sbX...
Convert this value to a XML string. @param This value's tag. @param objValue The raw data value. @return The XML string for this value.
[ "Convert", "this", "value", "to", "a", "XML", "string", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/model/base/src/main/java/org/jbundle/model/util/Util.java#L318-L336
152,621
jbundle/jbundle
model/base/src/main/java/org/jbundle/model/util/Util.java
Util.isCData
public static boolean isCData(String string) { if (string != null) { for (int i = 0; i < string.length(); i++) { char chChar = string.charAt(i); if ((chChar == 0x9) || (chChar == 0xD) || (chChar == 0xA)) ...
java
public static boolean isCData(String string) { if (string != null) { for (int i = 0; i < string.length(); i++) { char chChar = string.charAt(i); if ((chChar == 0x9) || (chChar == 0xD) || (chChar == 0xA)) ...
[ "public", "static", "boolean", "isCData", "(", "String", "string", ")", "{", "if", "(", "string", "!=", "null", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "string", ".", "length", "(", ")", ";", "i", "++", ")", "{", "char", "chC...
Is this a CData string? @param string The string to analyze. @return true if this string must be a CDATA area (if it has carriage-returns).
[ "Is", "this", "a", "CData", "string?" ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/model/base/src/main/java/org/jbundle/model/util/Util.java#L344-L358
152,622
jbundle/jbundle
model/base/src/main/java/org/jbundle/model/util/Util.java
Util.fixDOMElementName
public static String fixDOMElementName(String string) { for (int i = 0; i < string.length(); i++) { if (!Character.isJavaIdentifierPart(string.charAt(i))) string = string.substring(0, i) + "." + string.substring(i + 1); } return string; }
java
public static String fixDOMElementName(String string) { for (int i = 0; i < string.length(); i++) { if (!Character.isJavaIdentifierPart(string.charAt(i))) string = string.substring(0, i) + "." + string.substring(i + 1); } return string; }
[ "public", "static", "String", "fixDOMElementName", "(", "String", "string", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "string", ".", "length", "(", ")", ";", "i", "++", ")", "{", "if", "(", "!", "Character", ".", "isJavaIdentifierPar...
Fix this string so it can be a DOM element name.
[ "Fix", "this", "string", "so", "it", "can", "be", "a", "DOM", "element", "name", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/model/base/src/main/java/org/jbundle/model/util/Util.java#L362-L370
152,623
jbundle/jbundle
model/base/src/main/java/org/jbundle/model/util/Util.java
Util.convertClassName
public static String convertClassName(String className, String stringToInsert, int location) { int startSeq = 0; if (location >= 0) { for (int i = 0; i < location; i++) { startSeq = className.indexOf('.', startSeq + 1); } } else ...
java
public static String convertClassName(String className, String stringToInsert, int location) { int startSeq = 0; if (location >= 0) { for (int i = 0; i < location; i++) { startSeq = className.indexOf('.', startSeq + 1); } } else ...
[ "public", "static", "String", "convertClassName", "(", "String", "className", ",", "String", "stringToInsert", ",", "int", "location", ")", "{", "int", "startSeq", "=", "0", ";", "if", "(", "location", ">=", "0", ")", "{", "for", "(", "int", "i", "=", ...
Convert this class name by inserting this package after the domain. ie., if location = 2, com.xyz.abc.ClassName -> com.xyz.newpackage.abc.ClassName. @param className @param package location (positive = from left, negative = from right; 0 = before package, -1 = before class name, etc.) @param stringToInsert @return Conv...
[ "Convert", "this", "class", "name", "by", "inserting", "this", "package", "after", "the", "domain", ".", "ie", ".", "if", "location", "=", "2", "com", ".", "xyz", ".", "abc", ".", "ClassName", "-", ">", "com", ".", "xyz", ".", "newpackage", ".", "abc...
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/model/base/src/main/java/org/jbundle/model/util/Util.java#L469-L494
152,624
jbundle/jbundle
model/base/src/main/java/org/jbundle/model/util/Util.java
Util.getDomainName
public static String getDomainName(String className) { int i = className.indexOf('.'); i = className.indexOf('.', i + 1); if (i == -1) return null; return className.substring(0, i); }
java
public static String getDomainName(String className) { int i = className.indexOf('.'); i = className.indexOf('.', i + 1); if (i == -1) return null; return className.substring(0, i); }
[ "public", "static", "String", "getDomainName", "(", "String", "className", ")", "{", "int", "i", "=", "className", ".", "indexOf", "(", "'", "'", ")", ";", "i", "=", "className", ".", "indexOf", "(", "'", "'", ",", "i", "+", "1", ")", ";", "if", ...
Get the domain name from this package or class name @param className @return
[ "Get", "the", "domain", "name", "from", "this", "package", "or", "class", "name" ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/model/base/src/main/java/org/jbundle/model/util/Util.java#L500-L507
152,625
jbundle/jbundle
model/base/src/main/java/org/jbundle/model/util/Util.java
Util.getPackageName
public static String getPackageName(String className, boolean resource) { String packageName = null; if (className != null) { if (resource) if (className.endsWith(PROPERTIES)) className = className.substring(0, className.length() - PROPERTIES.length()); if (...
java
public static String getPackageName(String className, boolean resource) { String packageName = null; if (className != null) { if (resource) if (className.endsWith(PROPERTIES)) className = className.substring(0, className.length() - PROPERTIES.length()); if (...
[ "public", "static", "String", "getPackageName", "(", "String", "className", ",", "boolean", "resource", ")", "{", "String", "packageName", "=", "null", ";", "if", "(", "className", "!=", "null", ")", "{", "if", "(", "resource", ")", "if", "(", "className",...
Get the package name of this class name @param className @return
[ "Get", "the", "package", "name", "of", "this", "class", "name" ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/model/base/src/main/java/org/jbundle/model/util/Util.java#L553-L565
152,626
jbundle/jbundle
model/base/src/main/java/org/jbundle/model/util/Util.java
Util.getLogger
public static Logger getLogger() { if (m_logger == null) { m_logger = Logger.getLogger(Constant.ROOT_PACKAGE.substring(0, Constant.ROOT_PACKAGE.length() - 1)); try { LogManager logManager = LogManager.getLogManager(); logManager.reset();//removeAllGlo...
java
public static Logger getLogger() { if (m_logger == null) { m_logger = Logger.getLogger(Constant.ROOT_PACKAGE.substring(0, Constant.ROOT_PACKAGE.length() - 1)); try { LogManager logManager = LogManager.getLogManager(); logManager.reset();//removeAllGlo...
[ "public", "static", "Logger", "getLogger", "(", ")", "{", "if", "(", "m_logger", "==", "null", ")", "{", "m_logger", "=", "Logger", ".", "getLogger", "(", "Constant", ".", "ROOT_PACKAGE", ".", "substring", "(", "0", ",", "Constant", ".", "ROOT_PACKAGE", ...
Get the logger. @return The logger.
[ "Get", "the", "logger", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/model/base/src/main/java/org/jbundle/model/util/Util.java#L615-L642
152,627
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/KeyArea.java
KeyArea.addSelectParams
public String addSelectParams(String seekSign, int iAreaDesc, boolean bAddOnlyMods, boolean bIncludeFileName, boolean bUseCurrentValues, Vector<BaseField> vParamList, boolean bForceUniqueKey, boolean bIncludeTempFields) { if (iAreaDesc == DBConstants.START_SELECT_KEY) if (bAddOnlyMods) ...
java
public String addSelectParams(String seekSign, int iAreaDesc, boolean bAddOnlyMods, boolean bIncludeFileName, boolean bUseCurrentValues, Vector<BaseField> vParamList, boolean bForceUniqueKey, boolean bIncludeTempFields) { if (iAreaDesc == DBConstants.START_SELECT_KEY) if (bAddOnlyMods) ...
[ "public", "String", "addSelectParams", "(", "String", "seekSign", ",", "int", "iAreaDesc", ",", "boolean", "bAddOnlyMods", ",", "boolean", "bIncludeFileName", ",", "boolean", "bUseCurrentValues", ",", "Vector", "<", "BaseField", ">", "vParamList", ",", "boolean", ...
Setup the SQL Key Filter. @param seekSign The seek sign. @param iAreaDesc The key area to select. @param bAddOnlyMods Add only the keys which have modified? @param bIncludeFileName Include the file name in the string? @param bUseCurrentValues Use current values? @param vParamList The parameter list. @param bForceUnique...
[ "Setup", "the", "SQL", "Key", "Filter", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/KeyArea.java#L136-L173
152,628
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/KeyArea.java
KeyArea.getField
public BaseField getField(int iKeyFieldSeq) { if (this.getKeyField(iKeyFieldSeq) == null) return null; return this.getKeyField(iKeyFieldSeq).getField(DBConstants.FILE_KEY_AREA); }
java
public BaseField getField(int iKeyFieldSeq) { if (this.getKeyField(iKeyFieldSeq) == null) return null; return this.getKeyField(iKeyFieldSeq).getField(DBConstants.FILE_KEY_AREA); }
[ "public", "BaseField", "getField", "(", "int", "iKeyFieldSeq", ")", "{", "if", "(", "this", ".", "getKeyField", "(", "iKeyFieldSeq", ")", "==", "null", ")", "return", "null", ";", "return", "this", ".", "getKeyField", "(", "iKeyFieldSeq", ")", ".", "getFie...
Get the Field in this KeyField. This is just a convenience to get the field from the KeyField. @param iKeyFieldSeq The position of this field in the key area. @return The field.
[ "Get", "the", "Field", "in", "this", "KeyField", ".", "This", "is", "just", "a", "convenience", "to", "get", "the", "field", "from", "the", "KeyField", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/KeyArea.java#L283-L288
152,629
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/KeyArea.java
KeyArea.getKeyField
public KeyField getKeyField(int iKeyFieldSeq) { if (iKeyFieldSeq >= m_vKeyFieldList.size()) return null; return (KeyField)m_vKeyFieldList.elementAt(iKeyFieldSeq); }
java
public KeyField getKeyField(int iKeyFieldSeq) { if (iKeyFieldSeq >= m_vKeyFieldList.size()) return null; return (KeyField)m_vKeyFieldList.elementAt(iKeyFieldSeq); }
[ "public", "KeyField", "getKeyField", "(", "int", "iKeyFieldSeq", ")", "{", "if", "(", "iKeyFieldSeq", ">=", "m_vKeyFieldList", ".", "size", "(", ")", ")", "return", "null", ";", "return", "(", "KeyField", ")", "m_vKeyFieldList", ".", "elementAt", "(", "iKeyF...
Get this Key Field. @param iKeyFieldSeq The position of this keyfield in the key area. @return The key field.
[ "Get", "this", "Key", "Field", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/KeyArea.java#L294-L299
152,630
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/KeyArea.java
KeyArea.getKeySeq
public int getKeySeq() { // This is a dumb way to do this int iLastIndexArea = m_record.getKeyAreaCount() - 1 + DBConstants.MAIN_KEY_AREA; for (int nIndex = DBConstants.MAIN_KEY_AREA; nIndex <= iLastIndexArea; nIndex++) { KeyAreaInfo index = m_record.getKeyArea(nIndex); ...
java
public int getKeySeq() { // This is a dumb way to do this int iLastIndexArea = m_record.getKeyAreaCount() - 1 + DBConstants.MAIN_KEY_AREA; for (int nIndex = DBConstants.MAIN_KEY_AREA; nIndex <= iLastIndexArea; nIndex++) { KeyAreaInfo index = m_record.getKeyArea(nIndex); ...
[ "public", "int", "getKeySeq", "(", ")", "{", "// This is a dumb way to do this", "int", "iLastIndexArea", "=", "m_record", ".", "getKeyAreaCount", "(", ")", "-", "1", "+", "DBConstants", ".", "MAIN_KEY_AREA", ";", "for", "(", "int", "nIndex", "=", "DBConstants",...
Get the seq of this key area. Get rid of this method. @return The sequence of the keyarea.
[ "Get", "the", "seq", "of", "this", "key", "area", ".", "Get", "rid", "of", "this", "method", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/KeyArea.java#L322-L334
152,631
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/KeyArea.java
KeyArea.lastModified
public int lastModified(int iAreaDesc, boolean bForceUniqueKey) { // Set up the end key int iLastKeyField = this.getKeyFields(bForceUniqueKey, false) - 1; for (int iKeyFieldSeq = iLastKeyField; iKeyFieldSeq >= DBConstants.MAIN_KEY_FIELD; iKeyFieldSeq--) { KeyField keyField = th...
java
public int lastModified(int iAreaDesc, boolean bForceUniqueKey) { // Set up the end key int iLastKeyField = this.getKeyFields(bForceUniqueKey, false) - 1; for (int iKeyFieldSeq = iLastKeyField; iKeyFieldSeq >= DBConstants.MAIN_KEY_FIELD; iKeyFieldSeq--) { KeyField keyField = th...
[ "public", "int", "lastModified", "(", "int", "iAreaDesc", ",", "boolean", "bForceUniqueKey", ")", "{", "// Set up the end key", "int", "iLastKeyField", "=", "this", ".", "getKeyFields", "(", "bForceUniqueKey", ",", "false", ")", "-", "1", ";", "for", "(", "int...
Any of these key fields modified? @param iAreaDesc The key field area to get the values from. @param iStartKeyFieldSeq The starting key field to check (from here on). @return true if any have been modified.
[ "Any", "of", "these", "key", "fields", "modified?" ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/KeyArea.java#L391-L401
152,632
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/KeyArea.java
KeyArea.reverseBookmark
public void reverseBookmark(Object bookmark, int iAreaDesc) { if (this.getKeyFields() == 1) // Special case - single unique key; { BaseField field = this.getField(iAreaDesc); boolean[] rgbEnabled = field.setEnableListeners(false); field.setData(bookmark, DBConst...
java
public void reverseBookmark(Object bookmark, int iAreaDesc) { if (this.getKeyFields() == 1) // Special case - single unique key; { BaseField field = this.getField(iAreaDesc); boolean[] rgbEnabled = field.setEnableListeners(false); field.setData(bookmark, DBConst...
[ "public", "void", "reverseBookmark", "(", "Object", "bookmark", ",", "int", "iAreaDesc", ")", "{", "if", "(", "this", ".", "getKeyFields", "(", ")", "==", "1", ")", "// Special case - single unique key;", "{", "BaseField", "field", "=", "this", ".", "getField"...
Take this BOOKMARK handle and back it into the fields. @param bookmark The bookmark handle. @param iAreaDesc The area to move it into.
[ "Take", "this", "BOOKMARK", "handle", "and", "back", "it", "into", "the", "fields", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/KeyArea.java#L407-L423
152,633
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/KeyArea.java
KeyArea.setupBookmark
public Object setupBookmark(int iAreaDesc) { if (this.getKeyFields() == 1) // Special case - single unique key; return this.getField(iAreaDesc).getData(); BaseBuffer buffer = new org.jbundle.thin.base.db.buff.str.StrBuffer(null); this.setupKeyBuffer(buffer, iAreaDesc); ...
java
public Object setupBookmark(int iAreaDesc) { if (this.getKeyFields() == 1) // Special case - single unique key; return this.getField(iAreaDesc).getData(); BaseBuffer buffer = new org.jbundle.thin.base.db.buff.str.StrBuffer(null); this.setupKeyBuffer(buffer, iAreaDesc); ...
[ "public", "Object", "setupBookmark", "(", "int", "iAreaDesc", ")", "{", "if", "(", "this", ".", "getKeyFields", "(", ")", "==", "1", ")", "// Special case - single unique key;", "return", "this", ".", "getField", "(", "iAreaDesc", ")", ".", "getData", "(", "...
Create a BOOKMARK handle for this key area. @return bookmark The bookmark handle. @param iAreaDesc The area to move it into.
[ "Create", "a", "BOOKMARK", "handle", "for", "this", "key", "area", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/KeyArea.java#L429-L436
152,634
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/KeyArea.java
KeyArea.setupKeyBuffer
public void setupKeyBuffer(BaseBuffer destBuffer, int iAreaDesc, boolean bMoveToField) { boolean bForceUniqueKey = true; int iKeyFieldCount = this.getKeyFields(bForceUniqueKey, false); for (int iKeyFieldSeq = DBConstants.MAIN_KEY_FIELD; iKeyFieldSeq < iKeyFieldCount; iKeyFieldSeq++) ...
java
public void setupKeyBuffer(BaseBuffer destBuffer, int iAreaDesc, boolean bMoveToField) { boolean bForceUniqueKey = true; int iKeyFieldCount = this.getKeyFields(bForceUniqueKey, false); for (int iKeyFieldSeq = DBConstants.MAIN_KEY_FIELD; iKeyFieldSeq < iKeyFieldCount; iKeyFieldSeq++) ...
[ "public", "void", "setupKeyBuffer", "(", "BaseBuffer", "destBuffer", ",", "int", "iAreaDesc", ",", "boolean", "bMoveToField", ")", "{", "boolean", "bForceUniqueKey", "=", "true", ";", "int", "iKeyFieldCount", "=", "this", ".", "getKeyFields", "(", "bForceUniqueKey...
Set up the key area indicated. Remember to clear the destBuffer first. @param destBuffer A BaseBuffer to fill with data (ignore if null). @param iAreaDesc The (optional) temporary area to copy the current fields to. @param bMoveToField If true, move the param field to the field (default).
[ "Set", "up", "the", "key", "area", "indicated", ".", "Remember", "to", "clear", "the", "destBuffer", "first", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/KeyArea.java#L481-L504
152,635
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/KeyArea.java
KeyArea.zeroKeyFields
public void zeroKeyFields(int iAreaDesc) { // Set up the initial key boolean bForceUniqueKey = true; int iKeyFieldCount = this.getKeyFields(bForceUniqueKey, false); for (int iKeyFieldSeq = DBConstants.MAIN_KEY_FIELD; iKeyFieldSeq < iKeyFieldCount; iKeyFieldSeq++) { KeyF...
java
public void zeroKeyFields(int iAreaDesc) { // Set up the initial key boolean bForceUniqueKey = true; int iKeyFieldCount = this.getKeyFields(bForceUniqueKey, false); for (int iKeyFieldSeq = DBConstants.MAIN_KEY_FIELD; iKeyFieldSeq < iKeyFieldCount; iKeyFieldSeq++) { KeyF...
[ "public", "void", "zeroKeyFields", "(", "int", "iAreaDesc", ")", "{", "// Set up the initial key", "boolean", "bForceUniqueKey", "=", "true", ";", "int", "iKeyFieldCount", "=", "this", ".", "getKeyFields", "(", "bForceUniqueKey", ",", "false", ")", ";", "for", "...
Initialize the Key Fields. @param iAreaDesc The (optional) temporary area to copy the current fields to. @see BaseField.zeroKeyFields(int).
[ "Initialize", "the", "Key", "Fields", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/KeyArea.java#L510-L532
152,636
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/KeyArea.java
KeyArea.setKeyOrder
public void setKeyOrder(boolean bKeyOrder) { super.setKeyOrder(bKeyOrder); boolean bForceUniqueKey = true; int iKeyFieldCount = this.getKeyFields(bForceUniqueKey, false); for (int iKeyFieldSeq = DBConstants.MAIN_KEY_FIELD; iKeyFieldSeq < iKeyFieldCount; iKeyFieldSeq++) { ...
java
public void setKeyOrder(boolean bKeyOrder) { super.setKeyOrder(bKeyOrder); boolean bForceUniqueKey = true; int iKeyFieldCount = this.getKeyFields(bForceUniqueKey, false); for (int iKeyFieldSeq = DBConstants.MAIN_KEY_FIELD; iKeyFieldSeq < iKeyFieldCount; iKeyFieldSeq++) { ...
[ "public", "void", "setKeyOrder", "(", "boolean", "bKeyOrder", ")", "{", "super", ".", "setKeyOrder", "(", "bKeyOrder", ")", ";", "boolean", "bForceUniqueKey", "=", "true", ";", "int", "iKeyFieldCount", "=", "this", ".", "getKeyFields", "(", "bForceUniqueKey", ...
Order the keys ascending or descending?
[ "Order", "the", "keys", "ascending", "or", "descending?" ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/KeyArea.java#L648-L658
152,637
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/KeyArea.java
KeyArea.isNull
public boolean isNull(int iAreaDesc, boolean bIncludeTempFields) { for (int i = 0; i < this.getKeyFields(false, bIncludeTempFields); i++) { if (this.getField(i) != this.getRecord().getCounterField()) if (this.getKeyField(i).getField(iAreaDesc).isNull()) ...
java
public boolean isNull(int iAreaDesc, boolean bIncludeTempFields) { for (int i = 0; i < this.getKeyFields(false, bIncludeTempFields); i++) { if (this.getField(i) != this.getRecord().getCounterField()) if (this.getKeyField(i).getField(iAreaDesc).isNull()) ...
[ "public", "boolean", "isNull", "(", "int", "iAreaDesc", ",", "boolean", "bIncludeTempFields", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "this", ".", "getKeyFields", "(", "false", ",", "bIncludeTempFields", ")", ";", "i", "++", ")", "{"...
If any of the non-counter fields are null, return true. @param iAreaDesc @return
[ "If", "any", "of", "the", "non", "-", "counter", "fields", "are", "null", "return", "true", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/KeyArea.java#L664-L673
152,638
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/KeyArea.java
KeyArea.isNullable
public boolean isNullable() { for (int i = 0; i < this.getKeyFields(); i++) { if (this.getKeyField(i).getField(DBConstants.FILE_KEY_AREA).isNullable()) return true; // Is nullable } return false; // is not nullable }
java
public boolean isNullable() { for (int i = 0; i < this.getKeyFields(); i++) { if (this.getKeyField(i).getField(DBConstants.FILE_KEY_AREA).isNullable()) return true; // Is nullable } return false; // is not nullable }
[ "public", "boolean", "isNullable", "(", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "this", ".", "getKeyFields", "(", ")", ";", "i", "++", ")", "{", "if", "(", "this", ".", "getKeyField", "(", "i", ")", ".", "getField", "(", "DBC...
Can any of the fields in this key be null? @return
[ "Can", "any", "of", "the", "fields", "in", "this", "key", "be", "null?" ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/KeyArea.java#L678-L686
152,639
tvesalainen/util
security/src/main/java/org/vesalainen/net/ssl/AbstractSSLSocketChannel.java
AbstractSSLSocketChannel.read
@Override public long read(ByteBuffer[] dsts, int offset, int length) throws IOException { long rc = fillAppRead(); if (rc <= 0) { return rc; } return ByteBuffers.move(appRead, dsts, offset, length); }
java
@Override public long read(ByteBuffer[] dsts, int offset, int length) throws IOException { long rc = fillAppRead(); if (rc <= 0) { return rc; } return ByteBuffers.move(appRead, dsts, offset, length); }
[ "@", "Override", "public", "long", "read", "(", "ByteBuffer", "[", "]", "dsts", ",", "int", "offset", ",", "int", "length", ")", "throws", "IOException", "{", "long", "rc", "=", "fillAppRead", "(", ")", ";", "if", "(", "rc", "<=", "0", ")", "{", "r...
Reads ByteBuffer from peer. Starts handshaking if needed. @param dsts @param offset @param length @return @throws IOException @throws HelloForwardException if client hello triggers host filter. @see org.vesalainen.net.ssl.AbstractSSLSocketChannel#setHostFilter(java.util.function.Predicate)
[ "Reads", "ByteBuffer", "from", "peer", ".", "Starts", "handshaking", "if", "needed", "." ]
bba7a44689f638ffabc8be40a75bdc9a33676433
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/security/src/main/java/org/vesalainen/net/ssl/AbstractSSLSocketChannel.java#L349-L358
152,640
tvesalainen/util
security/src/main/java/org/vesalainen/net/ssl/AbstractSSLSocketChannel.java
AbstractSSLSocketChannel.write
@Override public long write(ByteBuffer[] srcs, int offset, int length) throws IOException { appWrite.compact(); long len = ByteBuffers.move(srcs, offset, length, appWrite); appWrite.flip(); wrap(); return len; }
java
@Override public long write(ByteBuffer[] srcs, int offset, int length) throws IOException { appWrite.compact(); long len = ByteBuffers.move(srcs, offset, length, appWrite); appWrite.flip(); wrap(); return len; }
[ "@", "Override", "public", "long", "write", "(", "ByteBuffer", "[", "]", "srcs", ",", "int", "offset", ",", "int", "length", ")", "throws", "IOException", "{", "appWrite", ".", "compact", "(", ")", ";", "long", "len", "=", "ByteBuffers", ".", "move", "...
Writes ByteBuffer to peer. Starts handshaking if needed. @param srcs @param offset @param length @return @throws IOException @throws HelloForwardException if client hello triggers host filter. @see org.vesalainen.net.ssl.AbstractSSLSocketChannel#setHostFilter(java.util.function.Predicate)
[ "Writes", "ByteBuffer", "to", "peer", ".", "Starts", "handshaking", "if", "needed", "." ]
bba7a44689f638ffabc8be40a75bdc9a33676433
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/security/src/main/java/org/vesalainen/net/ssl/AbstractSSLSocketChannel.java#L405-L413
152,641
jmeetsma/Iglu-Util
src/main/java/org/ijsberg/iglu/util/misc/EncodingSupport.java
EncodingSupport.encodeBase64
public static String encodeBase64(byte[] rawData, int lineLength) { if (rawData == null) { return ""; } StringBuffer retval = new StringBuffer(); int i = 0; int n = 0; for (; i < rawData.length - 2; i += 3) { if (lineLength > 0 && i > 0 && i % lineLength == 0) { retval.append("\n"); } //n is...
java
public static String encodeBase64(byte[] rawData, int lineLength) { if (rawData == null) { return ""; } StringBuffer retval = new StringBuffer(); int i = 0; int n = 0; for (; i < rawData.length - 2; i += 3) { if (lineLength > 0 && i > 0 && i % lineLength == 0) { retval.append("\n"); } //n is...
[ "public", "static", "String", "encodeBase64", "(", "byte", "[", "]", "rawData", ",", "int", "lineLength", ")", "{", "if", "(", "rawData", "==", "null", ")", "{", "return", "\"\"", ";", "}", "StringBuffer", "retval", "=", "new", "StringBuffer", "(", ")", ...
Converts a chunk of data into base 64 encoding. @param rawData @param lineLength optional length of lines in return value @return
[ "Converts", "a", "chunk", "of", "data", "into", "base", "64", "encoding", "." ]
971eb022115247b1e34dc26dd02e7e621e29e910
https://github.com/jmeetsma/Iglu-Util/blob/971eb022115247b1e34dc26dd02e7e621e29e910/src/main/java/org/ijsberg/iglu/util/misc/EncodingSupport.java#L51-L91
152,642
jmeetsma/Iglu-Util
src/main/java/org/ijsberg/iglu/util/misc/EncodingSupport.java
EncodingSupport.decodeBase64
public static byte[] decodeBase64(String encodedData) { BufferedReader reader = new BufferedReader(new StringReader(encodedData)); int length = encodedData.length(); byte[] retval = new byte[length]; int actualLength = 0; String line; try { while ((line = reader.readLine()) != null) { byte[] rawData...
java
public static byte[] decodeBase64(String encodedData) { BufferedReader reader = new BufferedReader(new StringReader(encodedData)); int length = encodedData.length(); byte[] retval = new byte[length]; int actualLength = 0; String line; try { while ((line = reader.readLine()) != null) { byte[] rawData...
[ "public", "static", "byte", "[", "]", "decodeBase64", "(", "String", "encodedData", ")", "{", "BufferedReader", "reader", "=", "new", "BufferedReader", "(", "new", "StringReader", "(", "encodedData", ")", ")", ";", "int", "length", "=", "encodedData", ".", "...
Decodes base 64 encoded string. @param encodedData @return
[ "Decodes", "base", "64", "encoded", "string", "." ]
971eb022115247b1e34dc26dd02e7e621e29e910
https://github.com/jmeetsma/Iglu-Util/blob/971eb022115247b1e34dc26dd02e7e621e29e910/src/main/java/org/ijsberg/iglu/util/misc/EncodingSupport.java#L99-L138
152,643
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/convert/PageNoConverter.java
PageNoConverter.init
public void init(String strPageDesc) { super.init(null); m_PageNo = 0; m_strPageDesc = strPageDesc; if ((m_strPageDesc == null) || (m_strPageDesc.length() == 0)) m_strPageDesc = "Page"; }
java
public void init(String strPageDesc) { super.init(null); m_PageNo = 0; m_strPageDesc = strPageDesc; if ((m_strPageDesc == null) || (m_strPageDesc.length() == 0)) m_strPageDesc = "Page"; }
[ "public", "void", "init", "(", "String", "strPageDesc", ")", "{", "super", ".", "init", "(", "null", ")", ";", "m_PageNo", "=", "0", ";", "m_strPageDesc", "=", "strPageDesc", ";", "if", "(", "(", "m_strPageDesc", "==", "null", ")", "||", "(", "m_strPag...
Initialize this Converter. @param strPageDesc The local string for the word "page".
[ "Initialize", "this", "Converter", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/convert/PageNoConverter.java#L55-L62
152,644
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/util/DatabaseCollection.java
DatabaseCollection.getDatabaseList
public Hashtable<String,Database> getDatabaseList(int iDatabaseType) { String strDbPrefix = this.getDatabasePrefix(iDatabaseType); iDatabaseType = iDatabaseType & DBConstants.TABLE_MASK; if ((iDatabaseType & DBConstants.TABLE_TYPE_MASK) == DBConstants.REMOTE) if (this.getProperty...
java
public Hashtable<String,Database> getDatabaseList(int iDatabaseType) { String strDbPrefix = this.getDatabasePrefix(iDatabaseType); iDatabaseType = iDatabaseType & DBConstants.TABLE_MASK; if ((iDatabaseType & DBConstants.TABLE_TYPE_MASK) == DBConstants.REMOTE) if (this.getProperty...
[ "public", "Hashtable", "<", "String", ",", "Database", ">", "getDatabaseList", "(", "int", "iDatabaseType", ")", "{", "String", "strDbPrefix", "=", "this", ".", "getDatabasePrefix", "(", "iDatabaseType", ")", ";", "iDatabaseType", "=", "iDatabaseType", "&", "DBC...
Get the table that holds this type of database. @param iDatabaseType The DB Type. @return The database table.
[ "Get", "the", "table", "that", "holds", "this", "type", "of", "database", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/util/DatabaseCollection.java#L139-L159
152,645
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/util/DatabaseCollection.java
DatabaseCollection.isConcreteDBClass
public boolean isConcreteDBClass(String strDbPrefix) { if ((DBParams.JDBC.equalsIgnoreCase(strDbPrefix)) || ("Serial".equalsIgnoreCase(strDbPrefix)) || ("Soap".equalsIgnoreCase(strDbPrefix)) || ("Xml".equalsIgnoreCase(strDbPrefix))) return true; ...
java
public boolean isConcreteDBClass(String strDbPrefix) { if ((DBParams.JDBC.equalsIgnoreCase(strDbPrefix)) || ("Serial".equalsIgnoreCase(strDbPrefix)) || ("Soap".equalsIgnoreCase(strDbPrefix)) || ("Xml".equalsIgnoreCase(strDbPrefix))) return true; ...
[ "public", "boolean", "isConcreteDBClass", "(", "String", "strDbPrefix", ")", "{", "if", "(", "(", "DBParams", ".", "JDBC", ".", "equalsIgnoreCase", "(", "strDbPrefix", ")", ")", "||", "(", "\"Serial\"", ".", "equalsIgnoreCase", "(", "strDbPrefix", ")", ")", ...
Is this DB type directly accessing the data? @param strDbPrefix @return
[ "Is", "this", "DB", "type", "directly", "accessing", "the", "data?" ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/util/DatabaseCollection.java#L165-L173
152,646
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/util/DatabaseCollection.java
DatabaseCollection.getDatabasePrefix
public String getDatabasePrefix(int iDatabaseType) { int iDBType = (iDatabaseType & DBConstants.TABLE_TYPE_MASK); String strDbPrefix = null; if (iDBType == DBConstants.LOCAL) strDbPrefix = this.getProperty(DBParams.LOCAL); else if (iDBType == DBConstants.REMOTE) ...
java
public String getDatabasePrefix(int iDatabaseType) { int iDBType = (iDatabaseType & DBConstants.TABLE_TYPE_MASK); String strDbPrefix = null; if (iDBType == DBConstants.LOCAL) strDbPrefix = this.getProperty(DBParams.LOCAL); else if (iDBType == DBConstants.REMOTE) ...
[ "public", "String", "getDatabasePrefix", "(", "int", "iDatabaseType", ")", "{", "int", "iDBType", "=", "(", "iDatabaseType", "&", "DBConstants", ".", "TABLE_TYPE_MASK", ")", ";", "String", "strDbPrefix", "=", "null", ";", "if", "(", "iDBType", "==", "DBConstan...
Get Database prefix. @param iDBType The DB Type. @return The database.
[ "Get", "Database", "prefix", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/util/DatabaseCollection.java#L197-L223
152,647
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/util/DatabaseCollection.java
DatabaseCollection.removeDatabase
public boolean removeDatabase(Database database) { database = (BaseDatabase)this.getDatabaseList((database.getDatabaseType() & DBConstants.TABLE_MASK)).remove(database.getDatabaseName(false)); if (database == null) return false; return true; }
java
public boolean removeDatabase(Database database) { database = (BaseDatabase)this.getDatabaseList((database.getDatabaseType() & DBConstants.TABLE_MASK)).remove(database.getDatabaseName(false)); if (database == null) return false; return true; }
[ "public", "boolean", "removeDatabase", "(", "Database", "database", ")", "{", "database", "=", "(", "BaseDatabase", ")", "this", ".", "getDatabaseList", "(", "(", "database", ".", "getDatabaseType", "(", ")", "&", "DBConstants", ".", "TABLE_MASK", ")", ")", ...
Remove this database from my database list. Do not call these directly, used in database free. @param database The database to free. @return true if successful.
[ "Remove", "this", "database", "from", "my", "database", "list", ".", "Do", "not", "call", "these", "directly", "used", "in", "database", "free", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/util/DatabaseCollection.java#L239-L245
152,648
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/util/DatabaseCollection.java
DatabaseCollection.getProperty
private String getProperty(String strProperty) { String strValue = m_databaseOwner.getProperty(strProperty); if (strValue == null) if (!(m_databaseOwner instanceof Environment)) if (m_databaseOwner.getEnvironment() != null) strValue = ((Environment)m_d...
java
private String getProperty(String strProperty) { String strValue = m_databaseOwner.getProperty(strProperty); if (strValue == null) if (!(m_databaseOwner instanceof Environment)) if (m_databaseOwner.getEnvironment() != null) strValue = ((Environment)m_d...
[ "private", "String", "getProperty", "(", "String", "strProperty", ")", "{", "String", "strValue", "=", "m_databaseOwner", ".", "getProperty", "(", "strProperty", ")", ";", "if", "(", "strValue", "==", "null", ")", "if", "(", "!", "(", "m_databaseOwner", "ins...
This is just a utility method to get the properties from the DB Owner. There is a slight difference between this getProperties and the one in the recordOwner. The recordowner getProperty method only checks up to the application. This method also checks the Environment properties. @param strProperty The key to look up t...
[ "This", "is", "just", "a", "utility", "method", "to", "get", "the", "properties", "from", "the", "DB", "Owner", ".", "There", "is", "a", "slight", "difference", "between", "this", "getProperties", "and", "the", "one", "in", "the", "recordOwner", ".", "The"...
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/util/DatabaseCollection.java#L254-L262
152,649
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/event/ValidateDigitHandler.java
ValidateDigitHandler.fieldChanged
public int fieldChanged(boolean bDisplayOption, int iMoveMode) { // Read a valid record int value = (int)((NumberField)this.getOwner()).getValue(); if ((value / 10) % 7 != value - (value / 10 * 10)) { Task task = null; if (this.getOwner() != null) if (...
java
public int fieldChanged(boolean bDisplayOption, int iMoveMode) { // Read a valid record int value = (int)((NumberField)this.getOwner()).getValue(); if ((value / 10) % 7 != value - (value / 10 * 10)) { Task task = null; if (this.getOwner() != null) if (...
[ "public", "int", "fieldChanged", "(", "boolean", "bDisplayOption", ",", "int", "iMoveMode", ")", "{", "// Read a valid record", "int", "value", "=", "(", "int", ")", "(", "(", "NumberField", ")", "this", ".", "getOwner", "(", ")", ")", ".", "getValue", "("...
The Field has Changed. Make sure this is a valid modulus-7 number, if not, return an error. @param bDisplayOption If true, display the change. @param iMoveMode The type of move being done (init/read/screen). @return The error code (or NORMAL_RETURN if okay).
[ "The", "Field", "has", "Changed", ".", "Make", "sure", "this", "is", "a", "valid", "modulus", "-", "7", "number", "if", "not", "return", "an", "error", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/event/ValidateDigitHandler.java#L60-L78
152,650
OwlPlatform/java-owl-worldmodel
src/main/java/com/owlplatform/worldmodel/solver/protocol/messages/OnDemandRequest.java
OnDemandRequest.getLength
public int getLength() { // Alias, number of patterns int length = 4 + 4; if (this.identifierPatterns != null) { for (String identifier : this.identifierPatterns) { try { length += (4 + identifier.getBytes("UTF-16BE").length); } catch (UnsupportedEncodingException e) { ...
java
public int getLength() { // Alias, number of patterns int length = 4 + 4; if (this.identifierPatterns != null) { for (String identifier : this.identifierPatterns) { try { length += (4 + identifier.getBytes("UTF-16BE").length); } catch (UnsupportedEncodingException e) { ...
[ "public", "int", "getLength", "(", ")", "{", "// Alias, number of patterns", "int", "length", "=", "4", "+", "4", ";", "if", "(", "this", ".", "identifierPatterns", "!=", "null", ")", "{", "for", "(", "String", "identifier", ":", "this", ".", "identifierPa...
Length of this object when encoded according to the Solver-World Model protocol. @return the length, in bytes, of the encoded form of this object.
[ "Length", "of", "this", "object", "when", "encoded", "according", "to", "the", "Solver", "-", "World", "Model", "protocol", "." ]
a850e8b930c6e9787c7cad30c0de887858ca563d
https://github.com/OwlPlatform/java-owl-worldmodel/blob/a850e8b930c6e9787c7cad30c0de887858ca563d/src/main/java/com/owlplatform/worldmodel/solver/protocol/messages/OnDemandRequest.java#L35-L49
152,651
js-lib-com/commons
src/main/java/js/converter/NumbersConverter.java
NumbersConverter.asObject
@Override public <T> T asObject(String string, Class<T> valueType) throws BugError { if ("null".equals(string)) { return null; } Number number = string.isEmpty() ? 0 : parseNumber(string); // hopefully int and double are most used numeric types and test them first if (Types.equalsAny(valueType, i...
java
@Override public <T> T asObject(String string, Class<T> valueType) throws BugError { if ("null".equals(string)) { return null; } Number number = string.isEmpty() ? 0 : parseNumber(string); // hopefully int and double are most used numeric types and test them first if (Types.equalsAny(valueType, i...
[ "@", "Override", "public", "<", "T", ">", "T", "asObject", "(", "String", "string", ",", "Class", "<", "T", ">", "valueType", ")", "throws", "BugError", "{", "if", "(", "\"null\"", ".", "equals", "(", "string", ")", ")", "{", "return", "null", ";", ...
Convert a string to a number of given type. If given string can't be stored into required type silent rounding is applied. If given string is empty return 0 since it is considered as an optional numeric input. @throws BugError if value type is not supported.
[ "Convert", "a", "string", "to", "a", "number", "of", "given", "type", ".", "If", "given", "string", "can", "t", "be", "stored", "into", "required", "type", "silent", "rounding", "is", "applied", ".", "If", "given", "string", "is", "empty", "return", "0",...
f8c64482142b163487745da74feb106f0765c16b
https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/converter/NumbersConverter.java#L27-L69
152,652
js-lib-com/commons
src/main/java/js/converter/NumbersConverter.java
NumbersConverter.parseNumber
private Number parseNumber(String string) { if (string.length() > 2 && string.charAt(0) == '0' && string.charAt(1) == 'x') { return Long.parseLong(string.substring(2), 16); } return Double.parseDouble(string); }
java
private Number parseNumber(String string) { if (string.length() > 2 && string.charAt(0) == '0' && string.charAt(1) == 'x') { return Long.parseLong(string.substring(2), 16); } return Double.parseDouble(string); }
[ "private", "Number", "parseNumber", "(", "String", "string", ")", "{", "if", "(", "string", ".", "length", "(", ")", ">", "2", "&&", "string", ".", "charAt", "(", "0", ")", "==", "'", "'", "&&", "string", ".", "charAt", "(", "1", ")", "==", "'", ...
Parse numeric string value to a number. @param string numeric string value. @return number instance.
[ "Parse", "numeric", "string", "value", "to", "a", "number", "." ]
f8c64482142b163487745da74feb106f0765c16b
https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/converter/NumbersConverter.java#L77-L82
152,653
entrusc/xdata
src/main/java/com/moebiusgames/xdata/ListDataKey.java
ListDataKey.create
public static <T> ListDataKey<T> create(String name, Class<T> dataClass) { return create(name, dataClass, true); }
java
public static <T> ListDataKey<T> create(String name, Class<T> dataClass) { return create(name, dataClass, true); }
[ "public", "static", "<", "T", ">", "ListDataKey", "<", "T", ">", "create", "(", "String", "name", ",", "Class", "<", "T", ">", "dataClass", ")", "{", "return", "create", "(", "name", ",", "dataClass", ",", "true", ")", ";", "}" ]
creates a list data key with the given name and type. Null types are allowed. @param <T> the type of the value @param name the name of the key that is stored in the xdata file @param dataClass the class of the type @return
[ "creates", "a", "list", "data", "key", "with", "the", "given", "name", "and", "type", ".", "Null", "types", "are", "allowed", "." ]
44ba4c59fd639c99b89fc8995ba83fe89ca4239d
https://github.com/entrusc/xdata/blob/44ba4c59fd639c99b89fc8995ba83fe89ca4239d/src/main/java/com/moebiusgames/xdata/ListDataKey.java#L72-L74
152,654
jbundle/jbundle
base/message/trx/src/main/java/org/jbundle/base/message/trx/message/external/convert/BaseConvertToNative.java
BaseConvertToNative.getTimeStamp
public XMLGregorianCalendar getTimeStamp() { GregorianCalendar cal = new GregorianCalendar(); DatatypeFactory dt; try { dt = DatatypeFactory.newInstance(); return dt.newXMLGregorianCalendar(cal); } catch (DatatypeConfigurationException e) { e.printStackTra...
java
public XMLGregorianCalendar getTimeStamp() { GregorianCalendar cal = new GregorianCalendar(); DatatypeFactory dt; try { dt = DatatypeFactory.newInstance(); return dt.newXMLGregorianCalendar(cal); } catch (DatatypeConfigurationException e) { e.printStackTra...
[ "public", "XMLGregorianCalendar", "getTimeStamp", "(", ")", "{", "GregorianCalendar", "cal", "=", "new", "GregorianCalendar", "(", ")", ";", "DatatypeFactory", "dt", ";", "try", "{", "dt", "=", "DatatypeFactory", ".", "newInstance", "(", ")", ";", "return", "d...
Get the current timestamp. @return
[ "Get", "the", "current", "timestamp", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/message/trx/src/main/java/org/jbundle/base/message/trx/message/external/convert/BaseConvertToNative.java#L154-L165
152,655
jbundle/jbundle
base/message/trx/src/main/java/org/jbundle/base/message/trx/message/external/convert/BaseConvertToNative.java
BaseConvertToNative.setPayloadProperties
public void setPayloadProperties(BaseMessage message, Object msg) { MessageDataDesc messageDataDesc = message.getMessageDataDesc(null); // Top level only if (messageDataDesc != null) { Map<String,Class<?>> mapPropertyNames = messageDataDesc.getPayloadPropertyNames(null); ...
java
public void setPayloadProperties(BaseMessage message, Object msg) { MessageDataDesc messageDataDesc = message.getMessageDataDesc(null); // Top level only if (messageDataDesc != null) { Map<String,Class<?>> mapPropertyNames = messageDataDesc.getPayloadPropertyNames(null); ...
[ "public", "void", "setPayloadProperties", "(", "BaseMessage", "message", ",", "Object", "msg", ")", "{", "MessageDataDesc", "messageDataDesc", "=", "message", ".", "getMessageDataDesc", "(", "null", ")", ";", "// Top level only", "if", "(", "messageDataDesc", "!=", ...
Move the standard payload properties from the message to the xml. @param message @param msg
[ "Move", "the", "standard", "payload", "properties", "from", "the", "message", "to", "the", "xml", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/message/trx/src/main/java/org/jbundle/base/message/trx/message/external/convert/BaseConvertToNative.java#L171-L189
152,656
jbundle/jbundle
base/message/trx/src/main/java/org/jbundle/base/message/trx/message/external/convert/BaseConvertToNative.java
BaseConvertToNative.setPayloadProperty
public void setPayloadProperty(BaseMessage message, Object msg, String strKey, Class<?> classKey) { Object data = message.get(strKey); if (data == null) return; this.setPayloadProperty(data, msg, strKey, classKey); }
java
public void setPayloadProperty(BaseMessage message, Object msg, String strKey, Class<?> classKey) { Object data = message.get(strKey); if (data == null) return; this.setPayloadProperty(data, msg, strKey, classKey); }
[ "public", "void", "setPayloadProperty", "(", "BaseMessage", "message", ",", "Object", "msg", ",", "String", "strKey", ",", "Class", "<", "?", ">", "classKey", ")", "{", "Object", "data", "=", "message", ".", "get", "(", "strKey", ")", ";", "if", "(", "...
Move this standard payload properties from the message to the xml. @param message @param msg @param strKey
[ "Move", "this", "standard", "payload", "properties", "from", "the", "message", "to", "the", "xml", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/message/trx/src/main/java/org/jbundle/base/message/trx/message/external/convert/BaseConvertToNative.java#L196-L202
152,657
jbundle/jbundle
base/message/trx/src/main/java/org/jbundle/base/message/trx/message/external/convert/BaseConvertToNative.java
BaseConvertToNative.setPayloadProperty
public void setPayloadProperty(Object data, Object msg, String strKey, Class<?> classKey) { String name = "set" + strKey; try { Class<?>[] params = {classKey}; Method method = msg.getClass().getMethod(name, params); if (method != null) { Object...
java
public void setPayloadProperty(Object data, Object msg, String strKey, Class<?> classKey) { String name = "set" + strKey; try { Class<?>[] params = {classKey}; Method method = msg.getClass().getMethod(name, params); if (method != null) { Object...
[ "public", "void", "setPayloadProperty", "(", "Object", "data", ",", "Object", "msg", ",", "String", "strKey", ",", "Class", "<", "?", ">", "classKey", ")", "{", "String", "name", "=", "\"set\"", "+", "strKey", ";", "try", "{", "Class", "<", "?", ">", ...
Move this standard payload data to the xml. @param message @param msg @param strKey
[ "Move", "this", "standard", "payload", "data", "to", "the", "xml", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/message/trx/src/main/java/org/jbundle/base/message/trx/message/external/convert/BaseConvertToNative.java#L209-L236
152,658
krotscheck/data-file-reader
data-file-reader-base/src/main/java/net/krotscheck/dfr/DecoderCache.java
DecoderCache.populateCache
private static void populateCache() { if (cache == null) { cache = new LinkedHashMap<>(); logger.info("IDataDecoders found:"); ServiceLoader<IDataDecoder> loader = ServiceLoader.load(IDataDecoder.class); // Logging. for (IDataDec...
java
private static void populateCache() { if (cache == null) { cache = new LinkedHashMap<>(); logger.info("IDataDecoders found:"); ServiceLoader<IDataDecoder> loader = ServiceLoader.load(IDataDecoder.class); // Logging. for (IDataDec...
[ "private", "static", "void", "populateCache", "(", ")", "{", "if", "(", "cache", "==", "null", ")", "{", "cache", "=", "new", "LinkedHashMap", "<>", "(", ")", ";", "logger", ".", "info", "(", "\"IDataDecoders found:\"", ")", ";", "ServiceLoader", "<", "I...
Populates the cache.
[ "Populates", "the", "cache", "." ]
b9a85bd07dc9f9b8291ffbfb6945443d96371811
https://github.com/krotscheck/data-file-reader/blob/b9a85bd07dc9f9b8291ffbfb6945443d96371811/data-file-reader-base/src/main/java/net/krotscheck/dfr/DecoderCache.java#L56-L74
152,659
krotscheck/data-file-reader
data-file-reader-base/src/main/java/net/krotscheck/dfr/DecoderCache.java
DecoderCache.getDecoder
public static IDataDecoder getDecoder(final String mimeType) throws ClassNotFoundException, IllegalAccessException, InstantiationException { populateCache(); if (!cache.containsKey(mimeType)) { throw new ClassNotFoundException( String.format("IDa...
java
public static IDataDecoder getDecoder(final String mimeType) throws ClassNotFoundException, IllegalAccessException, InstantiationException { populateCache(); if (!cache.containsKey(mimeType)) { throw new ClassNotFoundException( String.format("IDa...
[ "public", "static", "IDataDecoder", "getDecoder", "(", "final", "String", "mimeType", ")", "throws", "ClassNotFoundException", ",", "IllegalAccessException", ",", "InstantiationException", "{", "populateCache", "(", ")", ";", "if", "(", "!", "cache", ".", "containsK...
Retrieve a decoder for a specified mime type. @param mimeType The mimetype to scan for. @return An instance of the decoder. @throws ClassNotFoundException Thrown when no decoder for a mimetype is found. @throws IllegalAccessException Thrown when the decoder's constructor is not accessible. Never thrown, as the service...
[ "Retrieve", "a", "decoder", "for", "a", "specified", "mime", "type", "." ]
b9a85bd07dc9f9b8291ffbfb6945443d96371811
https://github.com/krotscheck/data-file-reader/blob/b9a85bd07dc9f9b8291ffbfb6945443d96371811/data-file-reader-base/src/main/java/net/krotscheck/dfr/DecoderCache.java#L113-L128
152,660
fuinorg/utils4swing
src/main/java/org/fuin/utils4swing/progress/FileCopyProgressPanel.java
FileCopyProgressPanel.setCancelable
public final void setCancelable(final Cancelable cancelable) { if (SwingUtilities.isEventDispatchThread()) { setCancelableIntern(cancelable); } else { try { SwingUtilities.invokeLater(new Runnable() { public void run() { ...
java
public final void setCancelable(final Cancelable cancelable) { if (SwingUtilities.isEventDispatchThread()) { setCancelableIntern(cancelable); } else { try { SwingUtilities.invokeLater(new Runnable() { public void run() { ...
[ "public", "final", "void", "setCancelable", "(", "final", "Cancelable", "cancelable", ")", "{", "if", "(", "SwingUtilities", ".", "isEventDispatchThread", "(", ")", ")", "{", "setCancelableIntern", "(", "cancelable", ")", ";", "}", "else", "{", "try", "{", "...
Sets the listener to inform about the user cancelling the current transfer. @param cancelable Listener or <code>null</code> if cancel is disabled.
[ "Sets", "the", "listener", "to", "inform", "about", "the", "user", "cancelling", "the", "current", "transfer", "." ]
560fb69eac182e3473de9679c3c15433e524ef6b
https://github.com/fuinorg/utils4swing/blob/560fb69eac182e3473de9679c3c15433e524ef6b/src/main/java/org/fuin/utils4swing/progress/FileCopyProgressPanel.java#L576-L590
152,661
fuinorg/utils4swing
src/main/java/org/fuin/utils4swing/progress/FileCopyProgressPanel.java
FileCopyProgressPanel.main
public static void main(final String[] args) { SwingUtilities.invokeLater(new Runnable() { public void run() { Utils4Swing.initSystemLookAndFeel(); Utils4Swing.createShowAndPosition("Test Progress Dialog", new FileCopyProgressPanel(), true...
java
public static void main(final String[] args) { SwingUtilities.invokeLater(new Runnable() { public void run() { Utils4Swing.initSystemLookAndFeel(); Utils4Swing.createShowAndPosition("Test Progress Dialog", new FileCopyProgressPanel(), true...
[ "public", "static", "void", "main", "(", "final", "String", "[", "]", "args", ")", "{", "SwingUtilities", ".", "invokeLater", "(", "new", "Runnable", "(", ")", "{", "public", "void", "run", "(", ")", "{", "Utils4Swing", ".", "initSystemLookAndFeel", "(", ...
Main method to test the panel. Only for testing purposes. @param args Not used.
[ "Main", "method", "to", "test", "the", "panel", ".", "Only", "for", "testing", "purposes", "." ]
560fb69eac182e3473de9679c3c15433e524ef6b
https://github.com/fuinorg/utils4swing/blob/560fb69eac182e3473de9679c3c15433e524ef6b/src/main/java/org/fuin/utils4swing/progress/FileCopyProgressPanel.java#L650-L658
152,662
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/event/ChangedByHandler.java
ChangedByHandler.fieldChanged
public int fieldChanged(boolean bDisplayOption, int iMoveMode) { // Read a valid record if (this.getOwner() != null) { IntegerField thisField = ((IntegerField)this.getOwner().getRecord().getField(m_iMainFilesFieldSeq)); if (this.getOwner().getRecord().getRecordOwner() != null...
java
public int fieldChanged(boolean bDisplayOption, int iMoveMode) { // Read a valid record if (this.getOwner() != null) { IntegerField thisField = ((IntegerField)this.getOwner().getRecord().getField(m_iMainFilesFieldSeq)); if (this.getOwner().getRecord().getRecordOwner() != null...
[ "public", "int", "fieldChanged", "(", "boolean", "bDisplayOption", ",", "int", "iMoveMode", ")", "{", "// Read a valid record", "if", "(", "this", ".", "getOwner", "(", ")", "!=", "null", ")", "{", "IntegerField", "thisField", "=", "(", "(", "IntegerField", ...
The Field has Changed. Change the changed by user field. @param bDisplayOption If true, display the change. @param iMoveMode The type of move being done (init/read/screen). @return The error code (or NORMAL_RETURN if okay).
[ "The", "Field", "has", "Changed", ".", "Change", "the", "changed", "by", "user", "field", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/event/ChangedByHandler.java#L97-L119
152,663
tvesalainen/util
util/src/main/java/org/vesalainen/math/sliding/AbstractSliding.java
AbstractSliding.eliminate
protected void eliminate() { int count = end-begin; int mod = Math.floorMod(begin, size); while (count > 0 && isRemovable(mod)) { remove(mod); begin++; count--; mod = Math.floorMod(begin, size); } }
java
protected void eliminate() { int count = end-begin; int mod = Math.floorMod(begin, size); while (count > 0 && isRemovable(mod)) { remove(mod); begin++; count--; mod = Math.floorMod(begin, size); } }
[ "protected", "void", "eliminate", "(", ")", "{", "int", "count", "=", "end", "-", "begin", ";", "int", "mod", "=", "Math", ".", "floorMod", "(", "begin", ",", "size", ")", ";", "while", "(", "count", ">", "0", "&&", "isRemovable", "(", "mod", ")", ...
Eliminate values that are no longer used in calculation
[ "Eliminate", "values", "that", "are", "no", "longer", "used", "in", "calculation" ]
bba7a44689f638ffabc8be40a75bdc9a33676433
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/math/sliding/AbstractSliding.java#L129-L140
152,664
tvesalainen/util
util/src/main/java/org/vesalainen/math/sliding/AbstractSliding.java
AbstractSliding.newArray
protected Object newArray(Object old, int oldLen, Object arr) { int sb = Math.floorMod(begin, oldLen); int se = Math.floorMod(end, oldLen); if (sb < se) { System.arraycopy(old, sb, arr, sb, se - sb); } else { System.arraycopy(old, sb, a...
java
protected Object newArray(Object old, int oldLen, Object arr) { int sb = Math.floorMod(begin, oldLen); int se = Math.floorMod(end, oldLen); if (sb < se) { System.arraycopy(old, sb, arr, sb, se - sb); } else { System.arraycopy(old, sb, a...
[ "protected", "Object", "newArray", "(", "Object", "old", ",", "int", "oldLen", ",", "Object", "arr", ")", "{", "int", "sb", "=", "Math", ".", "floorMod", "(", "begin", ",", "oldLen", ")", ";", "int", "se", "=", "Math", ".", "floorMod", "(", "end", ...
Returns new oldLen ring buffer @param old @param oldLen @param arr @return
[ "Returns", "new", "oldLen", "ring", "buffer" ]
bba7a44689f638ffabc8be40a75bdc9a33676433
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/math/sliding/AbstractSliding.java#L163-L177
152,665
FrodeRanders/java-vopn
src/main/java/org/gautelis/vopn/db/utils/BatchReader.java
BatchReader.readFile
public List<String> readFile(Reader reader) throws Exception { try { if (characteristics.doIgnoreCase()) { if (characteristics.aloneOnLine()) { // Batch separator is located alone on a line // beginning at first position. Ignore case. ...
java
public List<String> readFile(Reader reader) throws Exception { try { if (characteristics.doIgnoreCase()) { if (characteristics.aloneOnLine()) { // Batch separator is located alone on a line // beginning at first position. Ignore case. ...
[ "public", "List", "<", "String", ">", "readFile", "(", "Reader", "reader", ")", "throws", "Exception", "{", "try", "{", "if", "(", "characteristics", ".", "doIgnoreCase", "(", ")", ")", "{", "if", "(", "characteristics", ".", "aloneOnLine", "(", ")", ")"...
Reads an SQL-script and identifies individual statements. The batch separator handling is dependent on the database manager
[ "Reads", "an", "SQL", "-", "script", "and", "identifies", "individual", "statements", ".", "The", "batch", "separator", "handling", "is", "dependent", "on", "the", "database", "manager" ]
4c7b2f90201327af4eaa3cd46b3fee68f864e5cc
https://github.com/FrodeRanders/java-vopn/blob/4c7b2f90201327af4eaa3cd46b3fee68f864e5cc/src/main/java/org/gautelis/vopn/db/utils/BatchReader.java#L54-L139
152,666
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/util/ResourceTable.java
ResourceTable.syncRecords
public void syncRecords(Record recAlt, Record recMain) { boolean bFieldsInSync = true; // Copy the language-specific fields m_buffer = new VectorBuffer(null); for (int iIndex = 0; iIndex < recMain.getFieldCount(); iIndex++) { BaseField fieldAlt = recAlt.getField(i...
java
public void syncRecords(Record recAlt, Record recMain) { boolean bFieldsInSync = true; // Copy the language-specific fields m_buffer = new VectorBuffer(null); for (int iIndex = 0; iIndex < recMain.getFieldCount(); iIndex++) { BaseField fieldAlt = recAlt.getField(i...
[ "public", "void", "syncRecords", "(", "Record", "recAlt", ",", "Record", "recMain", ")", "{", "boolean", "bFieldsInSync", "=", "true", ";", "// Copy the language-specific fields", "m_buffer", "=", "new", "VectorBuffer", "(", "null", ")", ";", "for", "(", "int", ...
Save the record state and copy the localized fields from the language record to the main record. @param tblTarget The table to read the same record from. @param recSource Source record @return The target table's record.
[ "Save", "the", "record", "state", "and", "copy", "the", "localized", "fields", "from", "the", "language", "record", "to", "the", "main", "record", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/util/ResourceTable.java#L142-L169
152,667
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/util/ResourceTable.java
ResourceTable.restoreMainRecord
public void restoreMainRecord(Record record, boolean altMatchesToNull) { Iterator<BaseTable> iterator = this.getTables(); while (iterator.hasNext()) { BaseTable table = iterator.next(); if ((table != null) && (table != this.getNextTable())) { ...
java
public void restoreMainRecord(Record record, boolean altMatchesToNull) { Iterator<BaseTable> iterator = this.getTables(); while (iterator.hasNext()) { BaseTable table = iterator.next(); if ((table != null) && (table != this.getNextTable())) { ...
[ "public", "void", "restoreMainRecord", "(", "Record", "record", ",", "boolean", "altMatchesToNull", ")", "{", "Iterator", "<", "BaseTable", ">", "iterator", "=", "this", ".", "getTables", "(", ")", ";", "while", "(", "iterator", ".", "hasNext", "(", ")", "...
Restore the unchangeable info from the buffer to this main record. @param record The main record @param altMatchesToNull If the alternate field is the same as the main field, set it to null (no change).
[ "Restore", "the", "unchangeable", "info", "from", "the", "buffer", "to", "this", "main", "record", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/util/ResourceTable.java#L175-L187
152,668
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/util/ResourceTable.java
ResourceTable.restoreMainRecord
public void restoreMainRecord(Record recAlt, Record recMain, boolean altMatchesToNull) { if (m_buffer != null) m_buffer.resetPosition(); boolean bFieldsInSync = true; for (int iIndex = 0; iIndex < recAlt.getFieldCount(); iIndex++) { BaseField fieldAlt = recAlt...
java
public void restoreMainRecord(Record recAlt, Record recMain, boolean altMatchesToNull) { if (m_buffer != null) m_buffer.resetPosition(); boolean bFieldsInSync = true; for (int iIndex = 0; iIndex < recAlt.getFieldCount(); iIndex++) { BaseField fieldAlt = recAlt...
[ "public", "void", "restoreMainRecord", "(", "Record", "recAlt", ",", "Record", "recMain", ",", "boolean", "altMatchesToNull", ")", "{", "if", "(", "m_buffer", "!=", "null", ")", "m_buffer", ".", "resetPosition", "(", ")", ";", "boolean", "bFieldsInSync", "=", ...
Restore the main record's string fields to their original state from the buffer. @param recAlt The alternate record @param altMatchesToNull If the alternate field is the same as the main field, set it to null (no change). @param record The main record
[ "Restore", "the", "main", "record", "s", "string", "fields", "to", "their", "original", "state", "from", "the", "buffer", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/util/ResourceTable.java#L194-L225
152,669
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/ReferenceField.java
ReferenceField.moveFieldToThis
public int moveFieldToThis(BaseField field, boolean bDisplayOption, int iMoveMode) { // Save the record and datarecord. if (field == null) return DBConstants.NORMAL_RETURN; if (field instanceof CounterField) { if (this.getReferenceRecord(null, false) == null) ...
java
public int moveFieldToThis(BaseField field, boolean bDisplayOption, int iMoveMode) { // Save the record and datarecord. if (field == null) return DBConstants.NORMAL_RETURN; if (field instanceof CounterField) { if (this.getReferenceRecord(null, false) == null) ...
[ "public", "int", "moveFieldToThis", "(", "BaseField", "field", ",", "boolean", "bDisplayOption", ",", "int", "iMoveMode", ")", "{", "// Save the record and datarecord.", "if", "(", "field", "==", "null", ")", "return", "DBConstants", ".", "NORMAL_RETURN", ";", "if...
Move data to this field from another field. If these isn't a reference record yet, figures out the reference record. @param field The source field. @return The error code (or NORMAL_RETURN).
[ "Move", "data", "to", "this", "field", "from", "another", "field", ".", "If", "these", "isn", "t", "a", "reference", "record", "yet", "figures", "out", "the", "reference", "record", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/ReferenceField.java#L83-L100
152,670
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/ReferenceField.java
ReferenceField.getReference
public Record getReference() { Record record = this.getReferenceRecord(); if (record != null) { try { if (this.getData() == null) { record.addNew(); return record; } Object b...
java
public Record getReference() { Record record = this.getReferenceRecord(); if (record != null) { try { if (this.getData() == null) { record.addNew(); return record; } Object b...
[ "public", "Record", "getReference", "(", ")", "{", "Record", "record", "=", "this", ".", "getReferenceRecord", "(", ")", ";", "if", "(", "record", "!=", "null", ")", "{", "try", "{", "if", "(", "this", ".", "getData", "(", ")", "==", "null", ")", "...
Get the record that this field references and make it current. @return tour.db.Record Record pointing to the current data.
[ "Get", "the", "record", "that", "this", "field", "references", "and", "make", "it", "current", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/ReferenceField.java#L105-L131
152,671
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/ReferenceField.java
ReferenceField.getReferenceRecordName
public String getReferenceRecordName() { if (m_recordReference != null) return this.getReferenceRecord().getTableNames(false); else { // This code just takes a guess if (this.getClass().getName().indexOf("Field") != -1) return this.getClass().getName...
java
public String getReferenceRecordName() { if (m_recordReference != null) return this.getReferenceRecord().getTableNames(false); else { // This code just takes a guess if (this.getClass().getName().indexOf("Field") != -1) return this.getClass().getName...
[ "public", "String", "getReferenceRecordName", "(", ")", "{", "if", "(", "m_recordReference", "!=", "null", ")", "return", "this", ".", "getReferenceRecord", "(", ")", ".", "getTableNames", "(", "false", ")", ";", "else", "{", "// This code just takes a guess", "...
Get the record name that this field references. @return String Name of the record.
[ "Get", "the", "record", "name", "that", "this", "field", "references", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/ReferenceField.java#L136-L150
152,672
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/ReferenceField.java
ReferenceField.setReference
public int setReference(Record record, boolean bDisplayOption, int iMoveMode) { return this.moveFieldToThis((BaseField)record.getCounterField(), bDisplayOption, iMoveMode); }
java
public int setReference(Record record, boolean bDisplayOption, int iMoveMode) { return this.moveFieldToThis((BaseField)record.getCounterField(), bDisplayOption, iMoveMode); }
[ "public", "int", "setReference", "(", "Record", "record", ",", "boolean", "bDisplayOption", ",", "int", "iMoveMode", ")", "{", "return", "this", ".", "moveFieldToThis", "(", "(", "BaseField", ")", "record", ".", "getCounterField", "(", ")", ",", "bDisplayOptio...
Make this field a reference to the current object in this record info class. @param record tour.db.Record The current record to set this field to reference. @param bDisplayOption If true, display changes. @param iMoveMode The move mode. @return The error code (or NORMAL_RETURN).
[ "Make", "this", "field", "a", "reference", "to", "the", "current", "object", "in", "this", "record", "info", "class", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/ReferenceField.java#L167-L170
152,673
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/ReferenceField.java
ReferenceField.syncReference
public void syncReference(Record record) { this.setReferenceRecord(record); BaseField recordKeyField = (BaseField)record.getCounterField(); if ((recordKeyField.isNull()) && (!this.isNull()) && (!record.isModified()) && (record.getEditMode() != DBConstants.EDIT_CUR...
java
public void syncReference(Record record) { this.setReferenceRecord(record); BaseField recordKeyField = (BaseField)record.getCounterField(); if ((recordKeyField.isNull()) && (!this.isNull()) && (!record.isModified()) && (record.getEditMode() != DBConstants.EDIT_CUR...
[ "public", "void", "syncReference", "(", "Record", "record", ")", "{", "this", ".", "setReferenceRecord", "(", "record", ")", ";", "BaseField", "recordKeyField", "=", "(", "BaseField", ")", "record", ".", "getCounterField", "(", ")", ";", "if", "(", "(", "r...
Synchronize this refernce field with this record. Adds the behaviors to sync this field and the record. Used for popup screenfields where the referencerecord has a detail to display on change. @param record The reference record to synchronize.
[ "Synchronize", "this", "refernce", "field", "with", "this", "record", ".", "Adds", "the", "behaviors", "to", "sync", "this", "field", "and", "the", "record", ".", "Used", "for", "popup", "screenfields", "where", "the", "referencerecord", "has", "a", "detail", ...
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/ReferenceField.java#L214-L242
152,674
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/ReferenceField.java
ReferenceField.setupIconView
public ScreenComponent setupIconView(ScreenLoc itsLocation, ComponentParent targetScreen, Convert converter, int iDisplayFieldDesc, boolean bIncludeBlankOption) { ScreenComponent screenField = null; Record record = this.makeReferenceRecord(); // Set up the listener to read the current recor...
java
public ScreenComponent setupIconView(ScreenLoc itsLocation, ComponentParent targetScreen, Convert converter, int iDisplayFieldDesc, boolean bIncludeBlankOption) { ScreenComponent screenField = null; Record record = this.makeReferenceRecord(); // Set up the listener to read the current recor...
[ "public", "ScreenComponent", "setupIconView", "(", "ScreenLoc", "itsLocation", ",", "ComponentParent", "targetScreen", ",", "Convert", "converter", ",", "int", "iDisplayFieldDesc", ",", "boolean", "bIncludeBlankOption", ")", "{", "ScreenComponent", "screenField", "=", "...
Display a button that shows the icon from the current record in the secondary file.
[ "Display", "a", "button", "that", "shows", "the", "icon", "from", "the", "current", "record", "in", "the", "secondary", "file", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/ReferenceField.java#L305-L343
152,675
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/ReferenceField.java
ReferenceField.getIconField
public ImageField getIconField(Record record) { if (record == null) record = this.getReferenceRecord(); for (int i = 0; i < record.getFieldCount(); i++) { BaseField field = record.getField(i); if (field instanceof ImageField) return (ImageF...
java
public ImageField getIconField(Record record) { if (record == null) record = this.getReferenceRecord(); for (int i = 0; i < record.getFieldCount(); i++) { BaseField field = record.getField(i); if (field instanceof ImageField) return (ImageF...
[ "public", "ImageField", "getIconField", "(", "Record", "record", ")", "{", "if", "(", "record", "==", "null", ")", "record", "=", "this", ".", "getReferenceRecord", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "record", ".", "getFi...
Get the IconField from this record.
[ "Get", "the", "IconField", "from", "this", "record", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/ReferenceField.java#L347-L358
152,676
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/ReferenceField.java
ReferenceField.setupPopupView
public ScreenComponent setupPopupView(ScreenLoc itsLocation, ComponentParent targetScreen, Convert converter, int iDisplayFieldDesc, boolean bIncludeBlankOption) { ScreenComponent screenField = null; Record record = this.makeReferenceRecord(); // Set up the listener to read the current reco...
java
public ScreenComponent setupPopupView(ScreenLoc itsLocation, ComponentParent targetScreen, Convert converter, int iDisplayFieldDesc, boolean bIncludeBlankOption) { ScreenComponent screenField = null; Record record = this.makeReferenceRecord(); // Set up the listener to read the current reco...
[ "public", "ScreenComponent", "setupPopupView", "(", "ScreenLoc", "itsLocation", ",", "ComponentParent", "targetScreen", ",", "Convert", "converter", ",", "int", "iDisplayFieldDesc", ",", "boolean", "bIncludeBlankOption", ")", "{", "ScreenComponent", "screenField", "=", ...
Add icon to popup.
[ "Add", "icon", "to", "popup", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/ReferenceField.java#L362-L380
152,677
lightblueseas/file-worker
src/main/java/de/alpharogroup/file/copy/CopyFileExtensions.java
CopyFileExtensions.copyDirectory
public static boolean copyDirectory(final File source, final File destination) throws FileIsSecurityRestrictedException, IOException, FileIsADirectoryException, FileIsNotADirectoryException, DirectoryAlreadyExistsException { return copyDirectory(source, destination, true); }
java
public static boolean copyDirectory(final File source, final File destination) throws FileIsSecurityRestrictedException, IOException, FileIsADirectoryException, FileIsNotADirectoryException, DirectoryAlreadyExistsException { return copyDirectory(source, destination, true); }
[ "public", "static", "boolean", "copyDirectory", "(", "final", "File", "source", ",", "final", "File", "destination", ")", "throws", "FileIsSecurityRestrictedException", ",", "IOException", ",", "FileIsADirectoryException", ",", "FileIsNotADirectoryException", ",", "Direct...
Copies the given source directory to the given destination directory. @param source The source directory. @param destination The destination directory. @return 's true if the directory is copied, otherwise false. @throws FileIsSecurityRestrictedException Is thrown if the source file is security restricted. @throws I...
[ "Copies", "the", "given", "source", "directory", "to", "the", "given", "destination", "directory", "." ]
2c81de10fb5d68de64c1abc3ed64ca681ce76da8
https://github.com/lightblueseas/file-worker/blob/2c81de10fb5d68de64c1abc3ed64ca681ce76da8/src/main/java/de/alpharogroup/file/copy/CopyFileExtensions.java#L80-L85
152,678
lightblueseas/file-worker
src/main/java/de/alpharogroup/file/copy/CopyFileExtensions.java
CopyFileExtensions.copyDirectory
public static boolean copyDirectory(final File source, final File destination, final boolean lastModified) throws FileIsSecurityRestrictedException, IOException, FileIsADirectoryException, FileIsNotADirectoryException, DirectoryAlreadyExistsException { return copyDirectoryWithFileFilter(source, destination, null...
java
public static boolean copyDirectory(final File source, final File destination, final boolean lastModified) throws FileIsSecurityRestrictedException, IOException, FileIsADirectoryException, FileIsNotADirectoryException, DirectoryAlreadyExistsException { return copyDirectoryWithFileFilter(source, destination, null...
[ "public", "static", "boolean", "copyDirectory", "(", "final", "File", "source", ",", "final", "File", "destination", ",", "final", "boolean", "lastModified", ")", "throws", "FileIsSecurityRestrictedException", ",", "IOException", ",", "FileIsADirectoryException", ",", ...
Copies the given source directory to the given destination directory with the option to set the lastModified time from the given destination file or directory. @param source The source directory. @param destination The destination directory. @param lastModified Flag the tells if the attribute lastModified has to be se...
[ "Copies", "the", "given", "source", "directory", "to", "the", "given", "destination", "directory", "with", "the", "option", "to", "set", "the", "lastModified", "time", "from", "the", "given", "destination", "file", "or", "directory", "." ]
2c81de10fb5d68de64c1abc3ed64ca681ce76da8
https://github.com/lightblueseas/file-worker/blob/2c81de10fb5d68de64c1abc3ed64ca681ce76da8/src/main/java/de/alpharogroup/file/copy/CopyFileExtensions.java#L112-L117
152,679
lightblueseas/file-worker
src/main/java/de/alpharogroup/file/copy/CopyFileExtensions.java
CopyFileExtensions.copyDirectoryWithFileFilter
public static boolean copyDirectoryWithFileFilter(final File source, final File destination, final FileFilter fileFilter, final boolean lastModified) throws IOException, FileIsNotADirectoryException, FileIsADirectoryException, FileIsSecurityRestrictedException, DirectoryAlreadyExistsException { return copyDire...
java
public static boolean copyDirectoryWithFileFilter(final File source, final File destination, final FileFilter fileFilter, final boolean lastModified) throws IOException, FileIsNotADirectoryException, FileIsADirectoryException, FileIsSecurityRestrictedException, DirectoryAlreadyExistsException { return copyDire...
[ "public", "static", "boolean", "copyDirectoryWithFileFilter", "(", "final", "File", "source", ",", "final", "File", "destination", ",", "final", "FileFilter", "fileFilter", ",", "final", "boolean", "lastModified", ")", "throws", "IOException", ",", "FileIsNotADirector...
Copies all files that match to the FileFilter from the given source directory to the given destination directory with the option to set the lastModified time from the given destination file or directory. @param source The source directory. @param destination The destination directory. @param fileFilter The FileFilter ...
[ "Copies", "all", "files", "that", "match", "to", "the", "FileFilter", "from", "the", "given", "source", "directory", "to", "the", "given", "destination", "directory", "with", "the", "option", "to", "set", "the", "lastModified", "time", "from", "the", "given", ...
2c81de10fb5d68de64c1abc3ed64ca681ce76da8
https://github.com/lightblueseas/file-worker/blob/2c81de10fb5d68de64c1abc3ed64ca681ce76da8/src/main/java/de/alpharogroup/file/copy/CopyFileExtensions.java#L145-L151
152,680
lightblueseas/file-worker
src/main/java/de/alpharogroup/file/copy/CopyFileExtensions.java
CopyFileExtensions.copyDirectoryWithFileFilter
public static boolean copyDirectoryWithFileFilter(final File source, final File destination, final FileFilter includeFileFilter, final FileFilter excludeFileFilter, final Collection<File> excludeFiles, final boolean lastModified) throws IOException, FileIsNotADirectoryException, FileIsADirectoryException, FileI...
java
public static boolean copyDirectoryWithFileFilter(final File source, final File destination, final FileFilter includeFileFilter, final FileFilter excludeFileFilter, final Collection<File> excludeFiles, final boolean lastModified) throws IOException, FileIsNotADirectoryException, FileIsADirectoryException, FileI...
[ "public", "static", "boolean", "copyDirectoryWithFileFilter", "(", "final", "File", "source", ",", "final", "File", "destination", ",", "final", "FileFilter", "includeFileFilter", ",", "final", "FileFilter", "excludeFileFilter", ",", "final", "Collection", "<", "File"...
Copies all files that match to the given includeFileFilter and does not copy all the files that match the excludeFileFilter from the given source directory to the given destination directory with the option to set the lastModified time from the given destination file or directory. @param source The source directory. @...
[ "Copies", "all", "files", "that", "match", "to", "the", "given", "includeFileFilter", "and", "does", "not", "copy", "all", "the", "files", "that", "match", "the", "excludeFileFilter", "from", "the", "given", "source", "directory", "to", "the", "given", "destin...
2c81de10fb5d68de64c1abc3ed64ca681ce76da8
https://github.com/lightblueseas/file-worker/blob/2c81de10fb5d68de64c1abc3ed64ca681ce76da8/src/main/java/de/alpharogroup/file/copy/CopyFileExtensions.java#L226-L322
152,681
lightblueseas/file-worker
src/main/java/de/alpharogroup/file/copy/CopyFileExtensions.java
CopyFileExtensions.copyDirectoryWithFilenameFilter
public static boolean copyDirectoryWithFilenameFilter(final File source, final File destination, final FilenameFilter filenameFilter, final boolean lastModified) throws IOException, FileIsNotADirectoryException, FileIsADirectoryException, FileIsSecurityRestrictedException, DirectoryAlreadyExistsException { ret...
java
public static boolean copyDirectoryWithFilenameFilter(final File source, final File destination, final FilenameFilter filenameFilter, final boolean lastModified) throws IOException, FileIsNotADirectoryException, FileIsADirectoryException, FileIsSecurityRestrictedException, DirectoryAlreadyExistsException { ret...
[ "public", "static", "boolean", "copyDirectoryWithFilenameFilter", "(", "final", "File", "source", ",", "final", "File", "destination", ",", "final", "FilenameFilter", "filenameFilter", ",", "final", "boolean", "lastModified", ")", "throws", "IOException", ",", "FileIs...
Copies all files that match to the FilenameFilter from the given source directory to the given destination directory with the option to set the lastModified time from the given destination file or directory. @param source The source directory. @param destination The destination directory. @param filenameFilter The Fil...
[ "Copies", "all", "files", "that", "match", "to", "the", "FilenameFilter", "from", "the", "given", "source", "directory", "to", "the", "given", "destination", "directory", "with", "the", "option", "to", "set", "the", "lastModified", "time", "from", "the", "give...
2c81de10fb5d68de64c1abc3ed64ca681ce76da8
https://github.com/lightblueseas/file-worker/blob/2c81de10fb5d68de64c1abc3ed64ca681ce76da8/src/main/java/de/alpharogroup/file/copy/CopyFileExtensions.java#L350-L357
152,682
lightblueseas/file-worker
src/main/java/de/alpharogroup/file/copy/CopyFileExtensions.java
CopyFileExtensions.copyDirectoryWithFilenameFilter
public static boolean copyDirectoryWithFilenameFilter(final File source, final File destination, final FilenameFilter includeFilenameFilter, final FilenameFilter excludeFilenameFilter, final boolean lastModified) throws IOException, FileIsNotADirectoryException, FileIsADirectoryException, FileIsSecurityRestricted...
java
public static boolean copyDirectoryWithFilenameFilter(final File source, final File destination, final FilenameFilter includeFilenameFilter, final FilenameFilter excludeFilenameFilter, final boolean lastModified) throws IOException, FileIsNotADirectoryException, FileIsADirectoryException, FileIsSecurityRestricted...
[ "public", "static", "boolean", "copyDirectoryWithFilenameFilter", "(", "final", "File", "source", ",", "final", "File", "destination", ",", "final", "FilenameFilter", "includeFilenameFilter", ",", "final", "FilenameFilter", "excludeFilenameFilter", ",", "final", "boolean"...
Copies all files that match to the given includeFilenameFilter and does not copy all the files that match the excludeFilenameFilter from the given source directory to the given destination directory with the option to set the lastModified time from the given destination file or directory. @param source The source dire...
[ "Copies", "all", "files", "that", "match", "to", "the", "given", "includeFilenameFilter", "and", "does", "not", "copy", "all", "the", "files", "that", "match", "the", "excludeFilenameFilter", "from", "the", "given", "source", "directory", "to", "the", "given", ...
2c81de10fb5d68de64c1abc3ed64ca681ce76da8
https://github.com/lightblueseas/file-worker/blob/2c81de10fb5d68de64c1abc3ed64ca681ce76da8/src/main/java/de/alpharogroup/file/copy/CopyFileExtensions.java#L387-L467
152,683
lightblueseas/file-worker
src/main/java/de/alpharogroup/file/copy/CopyFileExtensions.java
CopyFileExtensions.copyFile
public static boolean copyFile(final File source, final File destination) throws IOException, FileIsADirectoryException { return copyFile(source, destination, true); }
java
public static boolean copyFile(final File source, final File destination) throws IOException, FileIsADirectoryException { return copyFile(source, destination, true); }
[ "public", "static", "boolean", "copyFile", "(", "final", "File", "source", ",", "final", "File", "destination", ")", "throws", "IOException", ",", "FileIsADirectoryException", "{", "return", "copyFile", "(", "source", ",", "destination", ",", "true", ")", ";", ...
Copies the given source file to the given destination file. @param source The source file. @param destination The destination file. @return 's true if the file is copied, otherwise false. @throws IOException Is thrown if an error occurs by reading or writing. @throws FileIsADirectoryException Is thrown if the destin...
[ "Copies", "the", "given", "source", "file", "to", "the", "given", "destination", "file", "." ]
2c81de10fb5d68de64c1abc3ed64ca681ce76da8
https://github.com/lightblueseas/file-worker/blob/2c81de10fb5d68de64c1abc3ed64ca681ce76da8/src/main/java/de/alpharogroup/file/copy/CopyFileExtensions.java#L484-L488
152,684
lightblueseas/file-worker
src/main/java/de/alpharogroup/file/copy/CopyFileExtensions.java
CopyFileExtensions.copyFile
public static boolean copyFile(final File source, final File destination, final boolean lastModified) throws IOException { return copyFile(source, destination, null, null, lastModified); }
java
public static boolean copyFile(final File source, final File destination, final boolean lastModified) throws IOException { return copyFile(source, destination, null, null, lastModified); }
[ "public", "static", "boolean", "copyFile", "(", "final", "File", "source", ",", "final", "File", "destination", ",", "final", "boolean", "lastModified", ")", "throws", "IOException", "{", "return", "copyFile", "(", "source", ",", "destination", ",", "null", ",...
Copies the given source file to the given destination file with the option to set the lastModified time from the given destination file. @param source The source file. @param destination The destination file. @param lastModified Flag the tells if the attribute lastModified has to be set with the attribute from the des...
[ "Copies", "the", "given", "source", "file", "to", "the", "given", "destination", "file", "with", "the", "option", "to", "set", "the", "lastModified", "time", "from", "the", "given", "destination", "file", "." ]
2c81de10fb5d68de64c1abc3ed64ca681ce76da8
https://github.com/lightblueseas/file-worker/blob/2c81de10fb5d68de64c1abc3ed64ca681ce76da8/src/main/java/de/alpharogroup/file/copy/CopyFileExtensions.java#L507-L511
152,685
lightblueseas/file-worker
src/main/java/de/alpharogroup/file/copy/CopyFileExtensions.java
CopyFileExtensions.copyFile
public static boolean copyFile(final File source, final File destination, final Charset sourceEncoding, final Charset destinationEncoding, final boolean lastModified) throws IOException { if (source.isDirectory()) { throw new IllegalArgumentException("The source File " + destination.getName() + " should...
java
public static boolean copyFile(final File source, final File destination, final Charset sourceEncoding, final Charset destinationEncoding, final boolean lastModified) throws IOException { if (source.isDirectory()) { throw new IllegalArgumentException("The source File " + destination.getName() + " should...
[ "public", "static", "boolean", "copyFile", "(", "final", "File", "source", ",", "final", "File", "destination", ",", "final", "Charset", "sourceEncoding", ",", "final", "Charset", "destinationEncoding", ",", "final", "boolean", "lastModified", ")", "throws", "IOEx...
Copies the given source file to the given destination file with the given source encodings and destination encodings. @param source the source @param destination the destination @param sourceEncoding the source encoding @param destinationEncoding the destination encoding @param lastModified if true the last modified f...
[ "Copies", "the", "given", "source", "file", "to", "the", "given", "destination", "file", "with", "the", "given", "source", "encodings", "and", "destination", "encodings", "." ]
2c81de10fb5d68de64c1abc3ed64ca681ce76da8
https://github.com/lightblueseas/file-worker/blob/2c81de10fb5d68de64c1abc3ed64ca681ce76da8/src/main/java/de/alpharogroup/file/copy/CopyFileExtensions.java#L531-L574
152,686
lightblueseas/file-worker
src/main/java/de/alpharogroup/file/copy/CopyFileExtensions.java
CopyFileExtensions.copyFileToDirectory
public static boolean copyFileToDirectory(final File source, final File destinationDir) throws FileIsNotADirectoryException, IOException, FileIsADirectoryException { return copyFileToDirectory(source, destinationDir, true); }
java
public static boolean copyFileToDirectory(final File source, final File destinationDir) throws FileIsNotADirectoryException, IOException, FileIsADirectoryException { return copyFileToDirectory(source, destinationDir, true); }
[ "public", "static", "boolean", "copyFileToDirectory", "(", "final", "File", "source", ",", "final", "File", "destinationDir", ")", "throws", "FileIsNotADirectoryException", ",", "IOException", ",", "FileIsADirectoryException", "{", "return", "copyFileToDirectory", "(", ...
Copies the given source file to the given destination directory. @param source The source file to copy in the destination directory. @param destinationDir The destination directory. @return 's true if the file is copied to the destination directory, otherwise false. @throws FileIsNotADirectoryException Is thrown if ...
[ "Copies", "the", "given", "source", "file", "to", "the", "given", "destination", "directory", "." ]
2c81de10fb5d68de64c1abc3ed64ca681ce76da8
https://github.com/lightblueseas/file-worker/blob/2c81de10fb5d68de64c1abc3ed64ca681ce76da8/src/main/java/de/alpharogroup/file/copy/CopyFileExtensions.java#L593-L597
152,687
lightblueseas/file-worker
src/main/java/de/alpharogroup/file/copy/CopyFileExtensions.java
CopyFileExtensions.copyFileToDirectory
public static boolean copyFileToDirectory(final File source, final File destinationDir, final boolean lastModified) throws FileIsNotADirectoryException, IOException, FileIsADirectoryException { if (null == destinationDir) { throw new IllegalArgumentException("Destination must not be null"); } if (!dest...
java
public static boolean copyFileToDirectory(final File source, final File destinationDir, final boolean lastModified) throws FileIsNotADirectoryException, IOException, FileIsADirectoryException { if (null == destinationDir) { throw new IllegalArgumentException("Destination must not be null"); } if (!dest...
[ "public", "static", "boolean", "copyFileToDirectory", "(", "final", "File", "source", ",", "final", "File", "destinationDir", ",", "final", "boolean", "lastModified", ")", "throws", "FileIsNotADirectoryException", ",", "IOException", ",", "FileIsADirectoryException", "{...
Copies the given source file to the given destination directory with the option to set the lastModified time from the given destination directory. @param source The source directory. @param destinationDir The destination directory. @param lastModified Flag the tells if the attribute lastModified has to be set with the...
[ "Copies", "the", "given", "source", "file", "to", "the", "given", "destination", "directory", "with", "the", "option", "to", "set", "the", "lastModified", "time", "from", "the", "given", "destination", "directory", "." ]
2c81de10fb5d68de64c1abc3ed64ca681ce76da8
https://github.com/lightblueseas/file-worker/blob/2c81de10fb5d68de64c1abc3ed64ca681ce76da8/src/main/java/de/alpharogroup/file/copy/CopyFileExtensions.java#L620-L637
152,688
drewwills/cernunnos
cernunnos-core/src/main/java/org/danann/cernunnos/sql/UpsertTask.java
UpsertTask.doUpdate
protected int doUpdate(JdbcTemplate jdbcTemplate, TaskRequest req, TaskResponse res) { //Setup the update parameters and setter final List<Phrase> parametersInUse = update_parameters != null ? update_parameters : parameters; final PreparedStatementSetter preparedStatementSetter = new PhraseParam...
java
protected int doUpdate(JdbcTemplate jdbcTemplate, TaskRequest req, TaskResponse res) { //Setup the update parameters and setter final List<Phrase> parametersInUse = update_parameters != null ? update_parameters : parameters; final PreparedStatementSetter preparedStatementSetter = new PhraseParam...
[ "protected", "int", "doUpdate", "(", "JdbcTemplate", "jdbcTemplate", ",", "TaskRequest", "req", ",", "TaskResponse", "res", ")", "{", "//Setup the update parameters and setter", "final", "List", "<", "Phrase", ">", "parametersInUse", "=", "update_parameters", "!=", "n...
Executes the update and returns the affected row count Moved to its own method to reduce possibility for variable name confusion
[ "Executes", "the", "update", "and", "returns", "the", "affected", "row", "count" ]
dc6848e0253775e22b6c869fd06506d4ddb6d728
https://github.com/drewwills/cernunnos/blob/dc6848e0253775e22b6c869fd06506d4ddb6d728/cernunnos-core/src/main/java/org/danann/cernunnos/sql/UpsertTask.java#L158-L166
152,689
drewwills/cernunnos
cernunnos-core/src/main/java/org/danann/cernunnos/sql/UpsertTask.java
UpsertTask.doInsert
protected int doInsert(JdbcTemplate jdbcTemplate, TaskRequest req, TaskResponse res) { //Setup the insert parameters and setter final List<Phrase> parametersInUse = insert_parameters != null ? insert_parameters : parameters; final PreparedStatementSetter preparedStatementSetter = new PhraseParam...
java
protected int doInsert(JdbcTemplate jdbcTemplate, TaskRequest req, TaskResponse res) { //Setup the insert parameters and setter final List<Phrase> parametersInUse = insert_parameters != null ? insert_parameters : parameters; final PreparedStatementSetter preparedStatementSetter = new PhraseParam...
[ "protected", "int", "doInsert", "(", "JdbcTemplate", "jdbcTemplate", ",", "TaskRequest", "req", ",", "TaskResponse", "res", ")", "{", "//Setup the insert parameters and setter", "final", "List", "<", "Phrase", ">", "parametersInUse", "=", "insert_parameters", "!=", "n...
Executes the insert and returns the affected row count Moved to its own method to reduce possibility for variable name confusion
[ "Executes", "the", "insert", "and", "returns", "the", "affected", "row", "count" ]
dc6848e0253775e22b6c869fd06506d4ddb6d728
https://github.com/drewwills/cernunnos/blob/dc6848e0253775e22b6c869fd06506d4ddb6d728/cernunnos-core/src/main/java/org/danann/cernunnos/sql/UpsertTask.java#L173-L181
152,690
jinahya/hex-codec
src/main/java/com/github/jinahya/codec/HexDecoder.java
HexDecoder.decodeSingle
public static int decodeSingle(final byte[] input, final int inoff) { if (input == null) { throw new NullPointerException("input"); } if (input.length < 2) { // not required by (inoff >= input.length -1) checked below throw new IllegalArgumentException( ...
java
public static int decodeSingle(final byte[] input, final int inoff) { if (input == null) { throw new NullPointerException("input"); } if (input.length < 2) { // not required by (inoff >= input.length -1) checked below throw new IllegalArgumentException( ...
[ "public", "static", "int", "decodeSingle", "(", "final", "byte", "[", "]", "input", ",", "final", "int", "inoff", ")", "{", "if", "(", "input", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\"input\"", ")", ";", "}", "if", "(", ...
Decodes two nibbles in given input array and returns the decoded octet. @param input the input array of nibbles. @param inoff the offset in the array. @return the decoded octet.
[ "Decodes", "two", "nibbles", "in", "given", "input", "array", "and", "returns", "the", "decoded", "octet", "." ]
159aa54010821655496177e76a3ef35a49fbd433
https://github.com/jinahya/hex-codec/blob/159aa54010821655496177e76a3ef35a49fbd433/src/main/java/com/github/jinahya/codec/HexDecoder.java#L91-L115
152,691
jinahya/hex-codec
src/main/java/com/github/jinahya/codec/HexDecoder.java
HexDecoder.decodeSingle
public static void decodeSingle(final byte[] input, final int inoff, final byte[] output, final int outoff) { if (output == null) { throw new NullPointerException("output"); } if (outoff < 0) { throw new IllegalArgumentException("outo...
java
public static void decodeSingle(final byte[] input, final int inoff, final byte[] output, final int outoff) { if (output == null) { throw new NullPointerException("output"); } if (outoff < 0) { throw new IllegalArgumentException("outo...
[ "public", "static", "void", "decodeSingle", "(", "final", "byte", "[", "]", "input", ",", "final", "int", "inoff", ",", "final", "byte", "[", "]", "output", ",", "final", "int", "outoff", ")", "{", "if", "(", "output", "==", "null", ")", "{", "throw"...
Decodes two nibbles in given input array and writes the resulting single octet into specified output array. @param input the input array @param inoff the offset in input array @param output the output array @param outoff the offset in output array
[ "Decodes", "two", "nibbles", "in", "given", "input", "array", "and", "writes", "the", "resulting", "single", "octet", "into", "specified", "output", "array", "." ]
159aa54010821655496177e76a3ef35a49fbd433
https://github.com/jinahya/hex-codec/blob/159aa54010821655496177e76a3ef35a49fbd433/src/main/java/com/github/jinahya/codec/HexDecoder.java#L127-L145
152,692
jinahya/hex-codec
src/main/java/com/github/jinahya/codec/HexDecoder.java
HexDecoder.decodeMultiple
public static void decodeMultiple(final byte[] input, int inoff, final byte[] output, int outoff, final int count) { if (count < 0) { throw new IllegalArgumentException("count(" + count + ") < 0"); } for (i...
java
public static void decodeMultiple(final byte[] input, int inoff, final byte[] output, int outoff, final int count) { if (count < 0) { throw new IllegalArgumentException("count(" + count + ") < 0"); } for (i...
[ "public", "static", "void", "decodeMultiple", "(", "final", "byte", "[", "]", "input", ",", "int", "inoff", ",", "final", "byte", "[", "]", "output", ",", "int", "outoff", ",", "final", "int", "count", ")", "{", "if", "(", "count", "<", "0", ")", "...
Decodes multiple units in given input array and writes the resulting octets into specifed output array. @param input the input array @param inoff the offset in input array @param output the output array @param outoff the offset in output array @param count the number of units to process
[ "Decodes", "multiple", "units", "in", "given", "input", "array", "and", "writes", "the", "resulting", "octets", "into", "specifed", "output", "array", "." ]
159aa54010821655496177e76a3ef35a49fbd433
https://github.com/jinahya/hex-codec/blob/159aa54010821655496177e76a3ef35a49fbd433/src/main/java/com/github/jinahya/codec/HexDecoder.java#L158-L171
152,693
jinahya/hex-codec
src/main/java/com/github/jinahya/codec/HexDecoder.java
HexDecoder.decodeMultiple
public static byte[] decodeMultiple(final byte[] input) { if (input == null) { throw new NullPointerException("input"); } final byte[] output = new byte[input.length >> 1]; // /2 decodeMultiple(input, 0, output, 0, output.length); return output; }
java
public static byte[] decodeMultiple(final byte[] input) { if (input == null) { throw new NullPointerException("input"); } final byte[] output = new byte[input.length >> 1]; // /2 decodeMultiple(input, 0, output, 0, output.length); return output; }
[ "public", "static", "byte", "[", "]", "decodeMultiple", "(", "final", "byte", "[", "]", "input", ")", "{", "if", "(", "input", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\"input\"", ")", ";", "}", "final", "byte", "[", "]", ...
Encodes given sequence of nibbles into a sequence of octets. @param input the nibbles to decode. @return the decoded octets.
[ "Encodes", "given", "sequence", "of", "nibbles", "into", "a", "sequence", "of", "octets", "." ]
159aa54010821655496177e76a3ef35a49fbd433
https://github.com/jinahya/hex-codec/blob/159aa54010821655496177e76a3ef35a49fbd433/src/main/java/com/github/jinahya/codec/HexDecoder.java#L181-L192
152,694
jinahya/hex-codec
src/main/java/com/github/jinahya/codec/HexDecoder.java
HexDecoder.decodeToString
public String decodeToString(final byte[] input, final String outputCharset) throws UnsupportedEncodingException { return new String(decode(input), outputCharset); }
java
public String decodeToString(final byte[] input, final String outputCharset) throws UnsupportedEncodingException { return new String(decode(input), outputCharset); }
[ "public", "String", "decodeToString", "(", "final", "byte", "[", "]", "input", ",", "final", "String", "outputCharset", ")", "throws", "UnsupportedEncodingException", "{", "return", "new", "String", "(", "decode", "(", "input", ")", ",", "outputCharset", ")", ...
Decodes given sequence of nibbles into a string. @param input the nibbles to decode @param outputCharset the charset name to encode output string @return the decoded string. @throws UnsupportedEncodingException if outputCharset is not supported
[ "Decodes", "given", "sequence", "of", "nibbles", "into", "a", "string", "." ]
159aa54010821655496177e76a3ef35a49fbd433
https://github.com/jinahya/hex-codec/blob/159aa54010821655496177e76a3ef35a49fbd433/src/main/java/com/github/jinahya/codec/HexDecoder.java#L218-L222
152,695
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/NumberField.java
NumberField.setString
public int setString(String strField, boolean bDisplayOption, int iMoveMode) // init this field override for other value { int iFieldLength = 0; Object objTempBinary = null; if (strField != null) { iFieldLength = strField.length(); int iMaxLeng...
java
public int setString(String strField, boolean bDisplayOption, int iMoveMode) // init this field override for other value { int iFieldLength = 0; Object objTempBinary = null; if (strField != null) { iFieldLength = strField.length(); int iMaxLeng...
[ "public", "int", "setString", "(", "String", "strField", ",", "boolean", "bDisplayOption", ",", "int", "iMoveMode", ")", "// init this field override for other value", "{", "int", "iFieldLength", "=", "0", ";", "Object", "objTempBinary", "=", "null", ";", "if", "(...
Convert and move string to this field. This Data is in a binary format, so convert it and move it. @param bState the state to set the data to. @param bDisplayOption Display the data on the screen if true. @param iMoveMode INIT, SCREEN, or READ move mode. @return The error code.
[ "Convert", "and", "move", "string", "to", "this", "field", ".", "This", "Data", "is", "in", "a", "binary", "format", "so", "convert", "it", "and", "move", "it", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/NumberField.java#L170-L198
152,696
tvesalainen/util
util/src/main/java/org/vesalainen/util/navi/RateOfTurn.java
RateOfTurn.getRadius
public Distance getRadius(Velocity velocity) { Distance circle = velocity.getDistance(getTimeForFullCircle()); circle.mul(1/Math.PI); return circle; }
java
public Distance getRadius(Velocity velocity) { Distance circle = velocity.getDistance(getTimeForFullCircle()); circle.mul(1/Math.PI); return circle; }
[ "public", "Distance", "getRadius", "(", "Velocity", "velocity", ")", "{", "Distance", "circle", "=", "velocity", ".", "getDistance", "(", "getTimeForFullCircle", "(", ")", ")", ";", "circle", ".", "mul", "(", "1", "/", "Math", ".", "PI", ")", ";", "retur...
Returns the radius of the circle @param velocity Speed of the vessel @return
[ "Returns", "the", "radius", "of", "the", "circle" ]
bba7a44689f638ffabc8be40a75bdc9a33676433
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/navi/RateOfTurn.java#L79-L84
152,697
tvesalainen/util
util/src/main/java/org/vesalainen/util/navi/RateOfTurn.java
RateOfTurn.getMotionAfter
public Motion getMotionAfter(Motion motion, TimeSpan span) { return new Motion(motion.getSpeed(), getBearingAfter(motion.getAngle(), span)); }
java
public Motion getMotionAfter(Motion motion, TimeSpan span) { return new Motion(motion.getSpeed(), getBearingAfter(motion.getAngle(), span)); }
[ "public", "Motion", "getMotionAfter", "(", "Motion", "motion", ",", "TimeSpan", "span", ")", "{", "return", "new", "Motion", "(", "motion", ".", "getSpeed", "(", ")", ",", "getBearingAfter", "(", "motion", ".", "getAngle", "(", ")", ",", "span", ")", ")"...
Return's motion after timespan @param motion Motion at the beginning @param span TimeSpan of turning @return
[ "Return", "s", "motion", "after", "timespan" ]
bba7a44689f638ffabc8be40a75bdc9a33676433
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/navi/RateOfTurn.java#L104-L107
152,698
krotscheck/data-file-reader
data-file-filter-column/src/main/java/net/krotscheck/dfr/filter/column/ColumnFilter.java
ColumnFilter.apply
@Override public Map<String, Object> apply(final Map<String, Object> row) { Map<String, Object> cleanRow, filteredRow; // Make sure the row isn't null. if (row == null) { cleanRow = new LinkedHashMap<>(); } else { cleanRow = new LinkedHashMap<>(row); ...
java
@Override public Map<String, Object> apply(final Map<String, Object> row) { Map<String, Object> cleanRow, filteredRow; // Make sure the row isn't null. if (row == null) { cleanRow = new LinkedHashMap<>(); } else { cleanRow = new LinkedHashMap<>(row); ...
[ "@", "Override", "public", "Map", "<", "String", ",", "Object", ">", "apply", "(", "final", "Map", "<", "String", ",", "Object", ">", "row", ")", "{", "Map", "<", "String", ",", "Object", ">", "cleanRow", ",", "filteredRow", ";", "// Make sure the row is...
Apply the filter. @param row The data row to apply this filter to. @return A row that only contains the configured columns.
[ "Apply", "the", "filter", "." ]
b9a85bd07dc9f9b8291ffbfb6945443d96371811
https://github.com/krotscheck/data-file-reader/blob/b9a85bd07dc9f9b8291ffbfb6945443d96371811/data-file-filter-column/src/main/java/net/krotscheck/dfr/filter/column/ColumnFilter.java#L102-L127
152,699
DependencyWatcher/agent
src/main/java/com/dependencywatcher/collector/ProjectInfoCollector.java
ProjectInfoCollector.collect
public File collect(Path projectRoot) throws IOException, ZipException { DataArchiver dataArchiver = new DataArchiver(projectRoot); try { ProjectFileVisitor fileVisitor = new ProjectFileVisitor( dataArchiver, projectRoot); Files.walkFileTree(projectRoot, fileVisitor); dataArchiver.add("DWFileList.t...
java
public File collect(Path projectRoot) throws IOException, ZipException { DataArchiver dataArchiver = new DataArchiver(projectRoot); try { ProjectFileVisitor fileVisitor = new ProjectFileVisitor( dataArchiver, projectRoot); Files.walkFileTree(projectRoot, fileVisitor); dataArchiver.add("DWFileList.t...
[ "public", "File", "collect", "(", "Path", "projectRoot", ")", "throws", "IOException", ",", "ZipException", "{", "DataArchiver", "dataArchiver", "=", "new", "DataArchiver", "(", "projectRoot", ")", ";", "try", "{", "ProjectFileVisitor", "fileVisitor", "=", "new", ...
Gathers needed information about project @param projectRoot Project root path @return archive containing the collected data @throws IOException @throws ZipException
[ "Gathers", "needed", "information", "about", "project" ]
6a082650275f9555993f5607d1f0bbe7aceceee1
https://github.com/DependencyWatcher/agent/blob/6a082650275f9555993f5607d1f0bbe7aceceee1/src/main/java/com/dependencywatcher/collector/ProjectInfoCollector.java#L24-L38