public Localisation getlocalisationUser(int idUser) { // ArrayList<User> users = new ArrayList<User>(); // ArrayList<Boolean> estOrganisateur = new ArrayList<Boolean>(); String query = "SELECT " + COL_POSITION_X + "," + COL_POSITION_Y + " FROM " + TABLE_LOCALISATION + " l WHERE l." + COL_USER_ID + " = " + idUser; // +" ;" ; Log.d("query select", query); Cursor cursor = database_.rawQuery(query, null); cursor.moveToFirst(); if (cursor != null) { Localisation localisation = new Localisation(cursor.getInt(0), cursor.getInt(1)); Log.d("LocalisationBDD", " : " + localisation.toString() + " de l'utilisateur : " + idUser); return localisation; } return null; }
public void insertLocalisation(Localisation localisation, int userId) { ContentValues values = new ContentValues(); values.put(COL_POSITION_X, localisation.getPositionX_()); values.put(COL_POSITION_Y, localisation.getPositionY_()); values.put(maBaseSQLite_.COL_USER_ID, userId); // on insère l'objet dans la BDD via le ContentValues database_.insert(maBaseSQLite_.TABLE_LOCALISATION, null, values); Log.d(DEBUG_TAG, "Insertion de la localisation faite "); }
public String toString1() { double r; Coord c; return "GluSky [" + id + "]" + (isCatalog() ? " catalog" : isProgen() ? " progen" : isMap() ? " fitsMap" : " survey") + " maxOrder:" + getMaxOrder() + (getLosangeOrder() >= 0 ? " cellOrder:" + getLosangeOrder() : "") + (!isCatalog() && isColored() ? " colored" : " B&W") + (!isCube() ? "" : " cube" + (cubeDepth == -1 ? "" : "/" + cubeDepth + (cubeFirstFrame == 0 ? "" : "/" + cubeFirstFrame))) + (!isFits() ? "" : isTruePixels() ? " *inFits*" : " inFits") + (!isJPEG() ? "" : isTruePixels() ? " inJPEG" : " *inJPEG*") + (!isPNG() ? "" : isTruePixels() ? " inPNG" : " *inPNG*") + (loadMocNow() ? " withMoc" : "") + (useCache() ? " cache" : " nocache") + " " + Localisation.getFrameName(getFrame()) + (isLocalDef() ? " localDef" : "") + (isLocal() ? " local" : "") + ((c = getTarget()) != null ? " target:" + c : "") + ((r = getRadius()) != -1 ? "/" + Coord.getUnit(r) : "") + " \"" + label + "\" => " + getUrl(); }