fixed cache list issue
This commit is contained in:
@@ -52,7 +52,7 @@ dependencies {
|
|||||||
//compile group: 'org.jfxtras', name: 'jfxtras-labs', version: '8.0-r1-SNAPSHOT' this is not an actual version and the map part is missing
|
//compile group: 'org.jfxtras', name: 'jfxtras-labs', version: '8.0-r1-SNAPSHOT' this is not an actual version and the map part is missing
|
||||||
compile files('lib/JFXtras/jfxtras-labs-8.0-r1-SNAPSHOT.jar', 'lib/ScenicView/ScenicView.jar')
|
compile files('lib/JFXtras/jfxtras-labs-8.0-r1-SNAPSHOT.jar', 'lib/ScenicView/ScenicView.jar')
|
||||||
compile group: 'org.jdom', name: 'jdom2', version: '2.0.5'
|
compile group: 'org.jdom', name: 'jdom2', version: '2.0.5'
|
||||||
compile group: 'org.controlsfx', name: 'controlsfx', version: '8.0.6'
|
compile group: 'org.controlsfx', name: 'controlsfx', version: '8.0.6_20'
|
||||||
compile group: 'org.codehaus.groovy', name: 'groovy-all', version: '2.2.1'
|
compile group: 'org.codehaus.groovy', name: 'groovy-all', version: '2.2.1'
|
||||||
compile group: 'org.jboss.weld.se', name: 'weld-se', version: '2.2.0.Final'
|
compile group: 'org.jboss.weld.se', name: 'weld-se', version: '2.2.0.Final'
|
||||||
compile group: 'com.orientechnologies', name: 'orient-commons', version: '2.0-SNAPSHOT'
|
compile group: 'com.orientechnologies', name: 'orient-commons', version: '2.0-SNAPSHOT'
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
package de.geofroggerfx.sql;
|
package de.geofroggerfx.database;
|
||||||
|
|
||||||
|
|
||||||
import com.orientechnologies.orient.object.db.OObjectDatabaseTx;
|
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
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* 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.ODatabaseRecordThreadLocal;
|
||||||
import com.orientechnologies.orient.core.db.record.ODatabaseRecord;
|
|
||||||
import com.orientechnologies.orient.object.db.OObjectDatabaseTx;
|
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.ApplicationParametersProvider;
|
||||||
import de.geofroggerfx.fx.utils.StartupScene;
|
import de.geofroggerfx.fx.utils.StartupScene;
|
||||||
import de.geofroggerfx.sql.DatabaseService;
|
import de.geofroggerfx.database.DatabaseService;
|
||||||
import javafx.application.Application;
|
import javafx.application.Application;
|
||||||
import javafx.scene.text.Font;
|
import javafx.scene.text.Font;
|
||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
import org.jboss.weld.environment.se.Weld;
|
import org.jboss.weld.environment.se.Weld;
|
||||||
import org.jboss.weld.environment.se.WeldContainer;
|
import org.jboss.weld.environment.se.WeldContainer;
|
||||||
import org.scenicview.ScenicView;
|
|
||||||
|
|
||||||
import javax.enterprise.util.AnnotationLiteral;
|
import javax.enterprise.util.AnnotationLiteral;
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,7 @@
|
|||||||
*/
|
*/
|
||||||
package de.geofroggerfx.model;
|
package de.geofroggerfx.model;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -34,7 +35,7 @@ public class CacheList {
|
|||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
private List<Cache> caches;
|
private List<Cache> caches = new ArrayList<>();
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return name;
|
return name;
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ import com.orientechnologies.orient.object.db.OObjectDatabaseTx;
|
|||||||
import de.geofroggerfx.application.ProgressEvent;
|
import de.geofroggerfx.application.ProgressEvent;
|
||||||
import de.geofroggerfx.application.ProgressListener;
|
import de.geofroggerfx.application.ProgressListener;
|
||||||
import de.geofroggerfx.model.*;
|
import de.geofroggerfx.model.*;
|
||||||
import de.geofroggerfx.sql.DatabaseService;
|
import de.geofroggerfx.database.DatabaseService;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -167,7 +167,7 @@ public class CacheServiceImpl implements CacheService {
|
|||||||
boolean doesExist = false;
|
boolean doesExist = false;
|
||||||
try {
|
try {
|
||||||
OObjectDatabaseTx database = dbService.getDatabase();
|
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));
|
List<CacheList> result = database.query(new OSQLSynchQuery<CacheList>(query));
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
doesExist = result.size() > 0;
|
doesExist = result.size() > 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user