fixed cache list issue
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
package de.geofroggerfx.sql;
|
||||
package de.geofroggerfx.database;
|
||||
|
||||
|
||||
import com.orientechnologies.orient.object.db.OObjectDatabaseTx;
|
||||
@@ -23,10 +23,9 @@
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
package de.geofroggerfx.sql;
|
||||
package de.geofroggerfx.database;
|
||||
|
||||
import com.orientechnologies.orient.core.db.ODatabaseRecordThreadLocal;
|
||||
import com.orientechnologies.orient.core.db.record.ODatabaseRecord;
|
||||
import com.orientechnologies.orient.object.db.OObjectDatabaseTx;
|
||||
|
||||
/**
|
||||
@@ -27,13 +27,12 @@ package de.geofroggerfx.fx;
|
||||
|
||||
import de.geofroggerfx.fx.utils.ApplicationParametersProvider;
|
||||
import de.geofroggerfx.fx.utils.StartupScene;
|
||||
import de.geofroggerfx.sql.DatabaseService;
|
||||
import de.geofroggerfx.database.DatabaseService;
|
||||
import javafx.application.Application;
|
||||
import javafx.scene.text.Font;
|
||||
import javafx.stage.Stage;
|
||||
import org.jboss.weld.environment.se.Weld;
|
||||
import org.jboss.weld.environment.se.WeldContainer;
|
||||
import org.scenicview.ScenicView;
|
||||
|
||||
import javax.enterprise.util.AnnotationLiteral;
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
*/
|
||||
package de.geofroggerfx.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -34,7 +35,7 @@ public class CacheList {
|
||||
|
||||
private String name;
|
||||
|
||||
private List<Cache> caches;
|
||||
private List<Cache> caches = new ArrayList<>();
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
|
||||
@@ -31,7 +31,7 @@ import com.orientechnologies.orient.object.db.OObjectDatabaseTx;
|
||||
import de.geofroggerfx.application.ProgressEvent;
|
||||
import de.geofroggerfx.application.ProgressListener;
|
||||
import de.geofroggerfx.model.*;
|
||||
import de.geofroggerfx.sql.DatabaseService;
|
||||
import de.geofroggerfx.database.DatabaseService;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import java.util.ArrayList;
|
||||
@@ -167,7 +167,7 @@ public class CacheServiceImpl implements CacheService {
|
||||
boolean doesExist = false;
|
||||
try {
|
||||
OObjectDatabaseTx database = dbService.getDatabase();
|
||||
String query = "select * from CacheList l where l.name = :name";
|
||||
String query = "select * from CacheList where name = '"+name+"'";
|
||||
List<CacheList> result = database.query(new OSQLSynchQuery<CacheList>(query));
|
||||
if (result != null) {
|
||||
doesExist = result.size() > 0;
|
||||
|
||||
Reference in New Issue
Block a user