@SuppressWarnings({"unchecked", "rawtypes"}) public int updateByExample(PO record, PE example) { MapperParamMap mpm = new MapperParamMap(); mpm.put("record", record); mpm.put("example", example); return super.update(initNamespace(".updateByExample"), mpm); }
@SuppressWarnings("unchecked") private Page pageByMetaObject(MetaObject metaObject) { DefaultParameterHandler defaultParameterHandler = (DefaultParameterHandler) metaObject.getValue("delegate.parameterHandler"); Object parameterObject = defaultParameterHandler.getParameterObject(); if (parameterObject != null && parameterObject instanceof MapperParamMap) { MapperParamMap resultMap = (MapperParamMap) parameterObject; if (!resultMap.containsKey("page")) { return null; } Object pageEx = resultMap.get("page"); if (pageEx != null) return (Page) pageEx; } return null; }