mike-jumper commented on a change in pull request #698:
URL: https://github.com/apache/guacamole-client/pull/698#discussion_r815517052



##########
File path: 
extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/base/ActivityRecordMapper.java
##########
@@ -0,0 +1,147 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.guacamole.auth.jdbc.base;
+
+import java.util.Collection;
+import java.util.List;
+import org.apache.guacamole.auth.jdbc.user.UserModel;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * Common interface for mapping activity records.
+ *
+ * @param <ModelType>
+ *     The type of model object representing the activity records mapped by
+ *     this mapper.
+ */
+public interface ActivityRecordMapper<ModelType> {
+
+    /**
+     * Inserts the given activity record.
+     *
+     * @param record
+     *     The activity record to insert.
+     *
+     * @return
+     *     The number of rows inserted.
+     */
+    int insert(@Param("record") ModelType record);
+
+    /**
+     * Updates the given activity record in the database, assigning an end
+     * date. No column of the existing activity record is updated except for
+     * the end date. If the record does not actually exist, this operation has
+     * no effect.
+     *
+     * @param record
+     *     The activity record to update.
+     *
+     * @return
+     *     The number of rows updated.
+     */
+    int updateEndDate(@Param("record") ModelType record);
+
+    /**
+     * Searches for up to <code>limit</code> activity records that contain
+     * the given terms, sorted by the given predicates, regardless of whether
+     * the data they are associated with is is readable by any particular user.

Review comment:
       Fixed via rebase.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to