@ -66,16 +68,15 @@ public class dbBuildingHandler extends dbHandlerBase {
@@ -66,16 +68,15 @@ public class dbBuildingHandler extends dbHandlerBase {
setFloat(15,w);
setFloat(16,rotY);
intobjectUUID=(int)getUUID();
ResultSetrs=preparedStatement.executeQuery();
intobjectUUID=(int)rs.getLong("UID");
if(objectUUID>0)
toCreate=GET_BUILDINGBYUUID(objectUUID);
}catch(Exceptione){
Logger.error("CREATE_BUILDING",e.getMessage());
returnnull;
}finally{
closeCallable();
}catch(SQLExceptione){
thrownewRuntimeException(e);
}
returntoCreate;
@ -93,6 +94,7 @@ public class dbBuildingHandler extends dbHandlerBase {
@@ -93,6 +94,7 @@ public class dbBuildingHandler extends dbHandlerBase {
}
publicBuildingGET_BUILDINGBYUUID(intuuid){
if(uuid==0)
returnnull;
@ -101,11 +103,19 @@ public class dbBuildingHandler extends dbHandlerBase {
@@ -101,11 +103,19 @@ public class dbBuildingHandler extends dbHandlerBase {
if(building!=null)
returnbuilding;
prepareCallable("SELECT `obj_building`.*, `object`.`parent` FROM `object` INNER JOIN `obj_building` ON `obj_building`.`UID` = `object`.`UID` WHERE `object`.`UID` = ?;");