本文整理了Java中org.modeshape.schematic.document.Document.getLong()
方法的一些代码示例,展示了Document.getLong()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Document.getLong()
方法的具体详情如下:
包路径:org.modeshape.schematic.document.Document
类名称:Document
方法名:getLong
[英]Get the integer value in this document for the given field name.
[中]获取此文档中给定字段名的整数值。
代码示例来源:origin: ModeShape/modeshape
public long getMinimumBinarySizeInBytes() {
return binaryStorage.getLong(FieldName.MINIMUM_BINARY_SIZE_IN_BYTES, Default.MINIMUM_BINARY_SIZE_IN_BYTES);
}
代码示例来源:origin: org.fcrepo/modeshape-jcr
public long getLockTimeoutMillis() {
return doc.getLong(FieldName.LOCK_TIMEOUT_MILLIS, Default.LOCK_TIMEOUT);
}
代码示例来源:origin: org.fcrepo/modeshape-jcr
public long getMinimumBinarySizeInBytes() {
return binaryStorage.getLong(FieldName.MINIMUM_BINARY_SIZE_IN_BYTES, Default.MINIMUM_BINARY_SIZE_IN_BYTES);
}
代码示例来源:origin: ModeShape/modeshape
public long getLockTimeoutMillis() {
return doc.getLong(FieldName.LOCK_TIMEOUT_MILLIS, Default.LOCK_TIMEOUT);
}
代码示例来源:origin: org.fcrepo/modeshape-jcr
public long getMinimumStringSize() {
return binaryStorage.getLong(FieldName.MINIMUM_STRING_SIZE, getMinimumBinarySizeInBytes());
}
代码示例来源:origin: ModeShape/modeshape
public long getMinimumStringSize() {
return binaryStorage.getLong(FieldName.MINIMUM_STRING_SIZE, getMinimumBinarySizeInBytes());
}
代码示例来源:origin: org.fcrepo/modeshape-jcr
public ChildReferencesInfo getChildReferencesInfo( Document document ) {
// Now look at the 'childrenInfo' document for info about the next block ...
Document childrenInfo = document.getDocument(CHILDREN_INFO);
if (childrenInfo != null) {
long totalSize = childrenInfo.getLong(COUNT, 0L);
long blockSize = childrenInfo.getLong(BLOCK_SIZE, 0L);
String nextBlockKey = childrenInfo.getString(NEXT_BLOCK);
String lastBlockKey = childrenInfo.getString(LAST_BLOCK, nextBlockKey);
return new ChildReferencesInfo(totalSize, blockSize, nextBlockKey, lastBlockKey);
}
return null;
}
代码示例来源:origin: ModeShape/modeshape
public ChildReferencesInfo getChildReferencesInfo( Document document ) {
// Now look at the 'childrenInfo' document for info about the next block ...
Document childrenInfo = document.getDocument(CHILDREN_INFO);
if (childrenInfo != null) {
long totalSize = childrenInfo.getLong(COUNT, 0L);
long blockSize = childrenInfo.getLong(BLOCK_SIZE, 0L);
String nextBlockKey = childrenInfo.getString(NEXT_BLOCK);
String lastBlockKey = childrenInfo.getString(LAST_BLOCK, nextBlockKey);
return new ChildReferencesInfo(totalSize, blockSize, nextBlockKey, lastBlockKey);
}
return null;
}
代码示例来源:origin: org.fcrepo/modeshape-jcr
protected BucketedChildReferences( Document parent, DocumentTranslator translator ) {
// the power of 16 which indicates how many buckets
this.bucketIdLength = parent.getInteger(DocumentConstants.BUCKET_ID_LENGTH);
Long size = parent.getLong(DocumentConstants.SIZE);
this.size = size != null ? size : 0;
this.parentKey = translator.getKey(parent);
this.translator = translator;
List<?> bucketsArray = parent.getArray(DocumentConstants.BUCKETS);
if (bucketsArray == null) {
this.bucketIds = Collections.emptySet();
} else {
this.bucketIds = new HashSet<>(bucketsArray.size());
for (Object bucketId : bucketsArray) {
this.bucketIds.add(new BucketId(bucketId.toString()));
}
}
this.rangeBucketsById = new LinkedHashMap<>(bucketIds.size());
}
代码示例来源:origin: ModeShape/modeshape
protected BucketedChildReferences( Document parent, DocumentTranslator translator ) {
// the power of 16 which indicates how many buckets
this.bucketIdLength = parent.getInteger(DocumentConstants.BUCKET_ID_LENGTH);
Long size = parent.getLong(DocumentConstants.SIZE);
this.size = size != null ? size : 0;
this.parentKey = translator.getKey(parent);
this.translator = translator;
List<?> bucketsArray = parent.getArray(DocumentConstants.BUCKETS);
if (bucketsArray == null) {
this.bucketIds = Collections.emptySet();
} else {
this.bucketIds = new HashSet<>(bucketsArray.size());
for (Object bucketId : bucketsArray) {
this.bucketIds.add(new BucketId(bucketId.toString()));
}
}
this.rangeBucketsById = new LinkedHashMap<>(bucketIds.size());
}
代码示例来源:origin: ModeShape/modeshape
return document.getBoolean(jcrName);
case DECIMAL:
return BigDecimal.valueOf(document.getLong(jcrName));
case INTEGER:
return document.getInteger(jcrName);
代码示例来源:origin: ModeShape/modeshape
protected void assertInfo( String key,
long expectedChildCount,
String expectedNextBlock,
String expectedLastBlock,
boolean firstBlock,
long expectedBlockSize ) {
Document doc = workspaceCache.documentStore().get(key).content();
Document info = doc.getDocument(DocumentTranslator.CHILDREN_INFO);
assertThat(info.getLong(DocumentTranslator.COUNT), is(expectedChildCount));
assertThat(info.getString(DocumentTranslator.NEXT_BLOCK), is(expectedNextBlock));
assertThat(info.getString(DocumentTranslator.LAST_BLOCK), is(expectedLastBlock));
if (firstBlock) {
assertThat(info.containsField(DocumentTranslator.BLOCK_SIZE), is(expectedNextBlock != null));
} else {
assertThat(info.getLong(DocumentTranslator.BLOCK_SIZE), is(expectedBlockSize));
}
}
}
代码示例来源:origin: org.fcrepo/modeshape-jcr
long size = doc.getLong(LENGTH_FIELD);
try {
return binaries.find(new BinaryKey(valueStr), size);
代码示例来源:origin: ModeShape/modeshape
long size = doc.getLong(LENGTH_FIELD);
try {
return binaries.find(new BinaryKey(valueStr), size);
内容来源于网络,如有侵权,请联系作者删除!