.getMetamodel(m.getPersistenceUnit()); String id = ((AbstractAttribute) m.getIdAttribute()).getJPAColumnName(); Object rowKey = ((DBObject) outputFile.get(MongoDBUtils.METADATA)).get(id); Class<?> rowKeyValueClass = rowKey.getClass(); Class<?> idClass = m.getIdAttribute().getJavaType();
/** * Get the value for a key in this file. * @param key the key to look up * @return the value for the key */ public Object get(final String key) throws IOException { return getFile().get(key); }
private DocumentFile<MongoType> getDocumentFile(DocumentID<MongoType> id, String filename) { DBObject query = QueryBuilder.start(DOCUMENT_KEY).is(id.getID()).and(FILENAME_KEY).is(filename).get(); GridFSDBFile file = documentfs.findOne(query); if(file==null) { return null; } DocumentFile<MongoType> df = new DocumentFile<MongoType>(id, file.getFilename(), file.getInputStream(), (String)file.get(STAGE_KEY), file.getUploadDate()); if(file.containsField(MIMETYPE_KEY)) { df.setMimetype((String) file.get(MIMETYPE_KEY)); } if(file.containsField(ENCODING_KEY)) { df.setEncoding((String) file.get(ENCODING_KEY)); } return df; }
.getMetamodel(m.getPersistenceUnit()); String id = ((AbstractAttribute) m.getIdAttribute()).getJPAColumnName(); Object rowKey = ((DBObject) outputFile.get(MongoDBUtils.METADATA)).get(id); Class<?> rowKeyValueClass = rowKey.getClass(); Class<?> idClass = m.getIdAttribute().getJavaType();