io.realm.exceptions.RealmPrimaryKeyConstraintException Java Examples
The following examples show how to use
io.realm.exceptions.RealmPrimaryKeyConstraintException.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AssetDefinitionService.java From alpha-wallet-android with MIT License | 6 votes |
private void createAuxData(Realm realm, TransactionResult tResult, String dataBaseKey) { try { //ContractAddress cAddr = new ContractAddress(tResult.contractChainId, tResult.contractAddress); RealmAuxData realmData = realm.createObject(RealmAuxData.class, dataBaseKey); realmData.setResultTime(tResult.resultTime); realmData.setResult(tResult.result); realmData.setChainId(tResult.contractChainId); realmData.setFunctionId(tResult.method); realmData.setTokenId(tResult.tokenId.toString(Character.MAX_RADIX)); } catch (RealmPrimaryKeyConstraintException e) { //in theory we should never see this e.printStackTrace(); } }