use of com.pspace.ifs.ksan.gw.object.multipart.Multipart in project ksan by infinistor.
the class MongoDataRepository method getMulipartUpload.
@Override
public Multipart getMulipartUpload(String uploadId) throws SQLException {
MongoCollection<Document> multip;
Multipart mpart = null;
multip = getMultiPartUploadCollection();
if (multip == null)
return null;
FindIterable fit = multip.find(Filters.eq(UPLOADID, uploadId));
Iterator it = fit.iterator();
if ((it.hasNext())) {
Document doc = (Document) it.next();
mpart = new Multipart(doc.getString(BUCKETNAME), doc.getString(OBJKEY), uploadId);
mpart.setLastModified((Date) doc.getDate(LASTMODIFIED));
mpart.setAcl(doc.getString(ACL));
mpart.setMeta(doc.getString(META));
}
return mpart;
}
Aggregations