/** * Set up a Getter to retrieve data * @param recordType type of record being retrieved (eg. databsae table name) * @param operationName query being performed for the record type (eg. findById, findByName, findActive, getInsertedId) * @param strategyMethod method to call to actually perform the data retrieval * @param queryMapper method to call on queryValues before calling strategyMethod with the results * @param resultMapper method to call on data returned from the strategyMethod before returning the results * @param useQueryValuesAsParams if set to true, the queryValues will be passed as the arguments to strategyMethod, rather than as the first argument */ AddGetter(recordType, operationName, strategyMethod, queryMapper, resultMapper, useQueryValuesAsParams) { //TODO: C# let bus = maglev.maglev.MagLev.getInstance('persistence'); //TODO: C# let args = [recordType, operationName, strategyMethod, queryMapper, resultMapper, useQueryValuesAsParams]; //TODO: bus.call('Persistence.AddGetter', args); }
/** * Set up a Mutator to change stored data * @param recordType type of record being changed (eg. databsae table name) * @param operationName action being performed on the record (eg. insert, update) * @param strategyMethod method to call to actually perform the mutation * @param updateMapper method to call on recordData before calling strategyMethod with the results * @param useRecordDataAsParams if set to true, the recordData will be passed as the arguments to strategyMethod, rather than as the first argument */ AddMutator(recordType, operationName, strategyMethod, updateMapper, useRecordDataAsParams) { //TODO: C# let bus = maglev.maglev.MagLev.getInstance('persistence'); //TODO: C# let args = [recordType, operationName, strategyMethod, updateMapper, useRecordDataAsParams]; //TODO: bus.call('Persistence.AddMutator', args); }