@Override
 public boolean writeToDB(DrmJobDatabase msDb) {
   boolean status = true;
   ContentValues values = new ContentValues();
   values.put(
       DatabaseConstants.COLUMN_NAME_TYPE, DatabaseConstants.JOBTYPE_GET_METERING_CERTIFICATE);
   values.put(DatabaseConstants.COLUMN_NAME_GRP_ID, this.getGroupId());
   if (mJobManager != null) {
     values.put(DatabaseConstants.COLUMN_NAME_SESSION_ID, mJobManager.getSessionId());
   }
   values.put(DatabaseConstants.COLUMN_NAME_GENERAL1, this.mCertificateServer);
   values.put(DatabaseConstants.COLUMN_NAME_GENERAL2, this.mMeteringId);
   values.put(DatabaseConstants.COLUMN_NAME_GENERAL3, this.mCustomData);
   values.put(DatabaseConstants.COLUMN_NAME_GRP_ID, this.getGroupId());
   long result = msDb.insert(values);
   if (result != -1) {
     super.setDatabaseId(result);
   } else {
     status = false;
   }
   return status;
 }
Exemplo n.º 2
0
 @Override
 public boolean writeToDB(DrmJobDatabase msDb) {
   boolean status = true;
   ContentValues values = new ContentValues();
   values.put(DatabaseConstants.COLUMN_NAME_TYPE, DatabaseConstants.JOBTYPE_JOIN_DOMAIN);
   values.put(DatabaseConstants.COLUMN_NAME_GRP_ID, this.getGroupId());
   if (mJobManager != null) {
     values.put(DatabaseConstants.COLUMN_NAME_SESSION_ID, mJobManager.getSessionId());
   }
   values.put(DatabaseConstants.COLUMN_NAME_GENERAL1, this.mController);
   values.put(DatabaseConstants.COLUMN_NAME_GENERAL2, this.mServiceId);
   values.put(DatabaseConstants.COLUMN_NAME_GENERAL3, this.mAccountId);
   values.put(DatabaseConstants.COLUMN_NAME_GENERAL4, this.mRevision);
   values.put(DatabaseConstants.COLUMN_NAME_GENERAL5, this.mCustomData);
   values.put(DatabaseConstants.COLUMN_NAME_GRP_ID, this.getGroupId());
   long result = msDb.insert(values);
   if (result != -1) {
     super.setDatabaseId(result);
   } else {
     status = false;
   }
   return status;
 }