}
@Override
protected VersionInfo getVersionInfo(String identifier) throws DotDataException,
DotStateException {
VersionInfo vi = icache.getVersionInfo(identifier);
if(vi==null || vi.getWorkingInode().equals("NOTFOUND")) {
Identifier ident = APILocator.getIdentifierAPI().find(identifier);
if(ident==null || !UtilMethods.isSet(ident.getId()))
return null;
Class clazz = UtilMethods.getVersionInfoType(ident.getAssetType());
HibernateUtil dh = new HibernateUtil(clazz);
dh.setQuery("from "+clazz.getName()+" where identifier=?");
dh.setParam(identifier);
Logger.debug(this.getClass(), "getVersionInfo query: "+dh.getQuery());
vi=(VersionInfo)dh.load();
if(!UtilMethods.isSet(vi.getIdentifier())) {
vi.setIdentifier(identifier);
vi.setWorkingInode("NOTFOUND");
}
icache.addVersionInfoToCache(vi);
}
if(vi.getWorkingInode().equals("NOTFOUND"))
return null;
else
return vi;
}