mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
Ticket #269: More things implemented. Still to do: ConnectionDirectory, and enforcing permissions on things in general.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
insert into guacamole_user values(1, 'guacadmin', x'AE97B20D5B24B2F18BE7921E3C0CF6109696391D7D5A6BE24BD267E49F0D7E42', x'FE24ADC5E11E2B25288D1704ABE67A79E342ECC26064CE69C5B3177795A82264');
|
||||
|
||||
insert into guacamole_system_permission values(1, 'CREATE_CONFIGURATION');
|
||||
insert into guacamole_system_permission values(1, 'CREATE_CONNECTION');
|
||||
insert into guacamole_system_permission values(1, 'CREATE_USER');
|
||||
|
@@ -54,7 +54,7 @@ CREATE TABLE `guacamole_connection_permission` (
|
||||
|
||||
CREATE TABLE `guacamole_system_permission` (
|
||||
`user_id` int(11) NOT NULL,
|
||||
`permission` enum('CREATE_CONFIGURATION','CREATE_USER') NOT NULL,
|
||||
`permission` enum('CREATE_CONNECTION','CREATE_USER') NOT NULL,
|
||||
PRIMARY KEY (`user_id`,`permission`),
|
||||
CONSTRAINT `guacamole_system_permission_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `guacamole_user` (`user_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
@@ -52,6 +52,7 @@ import net.sourceforge.guacamole.net.auth.mysql.dao.SystemPermissionMapper;
|
||||
import net.sourceforge.guacamole.net.auth.mysql.dao.UserMapper;
|
||||
import net.sourceforge.guacamole.net.auth.mysql.dao.UserPermissionMapper;
|
||||
import net.sourceforge.guacamole.net.auth.mysql.properties.MySQLGuacamoleProperties;
|
||||
import net.sourceforge.guacamole.net.auth.mysql.utility.PermissionCheckUtility;
|
||||
import net.sourceforge.guacamole.net.auth.mysql.utility.PasswordEncryptionUtility;
|
||||
import net.sourceforge.guacamole.net.auth.mysql.utility.SaltUtility;
|
||||
import net.sourceforge.guacamole.net.auth.mysql.utility.SecureRandomSaltUtility;
|
||||
@@ -112,6 +113,7 @@ public class MySQLAuthenticationProvider implements AuthenticationProvider {
|
||||
bind(MySQLUser.class);
|
||||
bind(SaltUtility.class).to(SecureRandomSaltUtility.class);
|
||||
bind(PasswordEncryptionUtility.class).to(Sha256PasswordEncryptionUtility.class);
|
||||
bind(PermissionCheckUtility.class);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package net.sourceforge.guacamole.net.auth.mysql;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import java.util.List;
|
||||
import net.sourceforge.guacamole.GuacamoleException;
|
||||
import net.sourceforge.guacamole.net.GuacamoleSocket;
|
||||
import net.sourceforge.guacamole.net.auth.Connection;
|
||||
import net.sourceforge.guacamole.net.auth.mysql.dao.ConnectionMapper;
|
||||
import net.sourceforge.guacamole.net.auth.mysql.model.ConnectionExample;
|
||||
import net.sourceforge.guacamole.protocol.GuacamoleClientInformation;
|
||||
import net.sourceforge.guacamole.protocol.GuacamoleConfiguration;
|
||||
|
||||
/**
|
||||
* A MySQL based implementation of the Connection object.
|
||||
* @author James Muehlner
|
||||
*/
|
||||
public class MySQLConnection implements Connection {
|
||||
|
||||
@Inject
|
||||
ConnectionMapper connectionDAO;
|
||||
|
||||
private net.sourceforge.guacamole.net.auth.mysql.model.Connection connection;
|
||||
|
||||
/**
|
||||
* Create a default, empty connection.
|
||||
*/
|
||||
MySQLConnection() {
|
||||
connection = new net.sourceforge.guacamole.net.auth.mysql.model.Connection();
|
||||
}
|
||||
|
||||
/**
|
||||
* Load an existing connection by name.
|
||||
* @param connectionName
|
||||
*/
|
||||
public void init(String connectionName) throws GuacamoleException {
|
||||
ConnectionExample example = new ConnectionExample();
|
||||
example.createCriteria().andConnection_nameEqualTo(connectionName);
|
||||
List<net.sourceforge.guacamole.net.auth.mysql.model.Connection> connections;
|
||||
connections = connectionDAO.selectByExample(example);
|
||||
if(connections.size() > 1) // the unique constraint should prevent this from happening
|
||||
throw new GuacamoleException("Multiple connections found named '" + connectionName + "'.");
|
||||
else if(connections.isEmpty())
|
||||
throw new GuacamoleException("No connection found named '" + connectionName + "'.");
|
||||
|
||||
connection = connections.get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize from a database record.
|
||||
* @param connection
|
||||
*/
|
||||
public void init(net.sourceforge.guacamole.net.auth.mysql.model.Connection connection) {
|
||||
this.connection = connection;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getIdentifier() {
|
||||
return connection.getConnection_name();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setIdentifier(String identifier) {
|
||||
connection.setConnection_name(identifier);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GuacamoleConfiguration getConfiguration() {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setConfiguration(GuacamoleConfiguration config) throws GuacamoleException {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public GuacamoleSocket connect(GuacamoleClientInformation info) throws GuacamoleException {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,71 @@
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (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.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is guacamole-auth-mysql.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* James Muehlner.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2010
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
package net.sourceforge.guacamole.net.auth.mysql;
|
||||
|
||||
/**
|
||||
* Constants relevant to the guacamole-auth-mysql project.
|
||||
* @author James Muehlner
|
||||
*/
|
||||
public interface MySQLConstants {
|
||||
|
||||
//*********** Permission Strings ***********
|
||||
// operations
|
||||
public static final String CREATE = "CREATE";
|
||||
public static final String READ = "READ";
|
||||
public static final String WRITE = "WRITE";
|
||||
public static final String DELETE = "DELETE";
|
||||
public static final String ADMINISTER = "ADMINISTER";
|
||||
|
||||
// used to separate operations from objects
|
||||
public static final String SEPARATOR = "_";
|
||||
|
||||
//object types
|
||||
public static final String USER = "USER";
|
||||
public static final String CONNECTION = "CONNECTION";
|
||||
|
||||
//combinations
|
||||
public static final String CREATE_USER = CREATE + SEPARATOR + USER;
|
||||
public static final String READ_USER = READ + SEPARATOR + USER;
|
||||
public static final String WRITE_USER = WRITE + SEPARATOR + USER;
|
||||
public static final String DELETE_USER = DELETE + SEPARATOR + USER;
|
||||
public static final String ADMINISTER_USER = ADMINISTER + SEPARATOR + USER;
|
||||
|
||||
public static final String CREATE_CONNECTION = CREATE + SEPARATOR + CONNECTION;
|
||||
public static final String READ_CONNECTION = READ + SEPARATOR + CONNECTION;
|
||||
public static final String WRITE_CONNECTION = WRITE + SEPARATOR + CONNECTION;
|
||||
public static final String DELETE_CONNECTION = DELETE + SEPARATOR + CONNECTION;
|
||||
public static final String ADMINISTER_CONNECTION = ADMINISTER + SEPARATOR + CONNECTION;
|
||||
}
|
@@ -47,6 +47,7 @@ import net.sourceforge.guacamole.net.auth.mysql.dao.UserMapper;
|
||||
import net.sourceforge.guacamole.net.auth.mysql.model.UserExample;
|
||||
import net.sourceforge.guacamole.net.auth.mysql.model.UserWithBLOBs;
|
||||
import net.sourceforge.guacamole.net.auth.mysql.utility.PasswordEncryptionUtility;
|
||||
import net.sourceforge.guacamole.net.auth.mysql.utility.PermissionCheckUtility;
|
||||
import net.sourceforge.guacamole.net.auth.mysql.utility.SaltUtility;
|
||||
import net.sourceforge.guacamole.net.auth.permission.Permission;
|
||||
|
||||
@@ -59,7 +60,7 @@ public class MySQLUser implements User {
|
||||
private UserWithBLOBs user;
|
||||
|
||||
@Inject
|
||||
UserMapper userDao;
|
||||
UserMapper userDAO;
|
||||
|
||||
@Inject
|
||||
PasswordEncryptionUtility passwordUtility;
|
||||
@@ -67,8 +68,14 @@ public class MySQLUser implements User {
|
||||
@Inject
|
||||
SaltUtility saltUtility;
|
||||
|
||||
@Inject
|
||||
PermissionCheckUtility permissionCheckUtility;
|
||||
|
||||
Set<Permission> permissions;
|
||||
|
||||
/**
|
||||
* Create a default, empty user.
|
||||
*/
|
||||
MySQLUser() {
|
||||
user = new UserWithBLOBs();
|
||||
permissions = new HashSet<Permission>();
|
||||
@@ -82,7 +89,7 @@ public class MySQLUser implements User {
|
||||
void init (Credentials credentials) throws GuacamoleException {
|
||||
UserExample userExample = new UserExample();
|
||||
userExample.createCriteria().andUsernameEqualTo(credentials.getUsername());
|
||||
List<UserWithBLOBs> users = userDao.selectByExampleWithBLOBs(userExample);
|
||||
List<UserWithBLOBs> users = userDAO.selectByExampleWithBLOBs(userExample);
|
||||
if(users.size() > 1) // the unique constraint on the table should prevent this
|
||||
throw new GuacamoleException("Multiple users found with the same username: " + credentials.getUsername());
|
||||
if(users.isEmpty())
|
||||
@@ -91,13 +98,60 @@ public class MySQLUser implements User {
|
||||
// check password
|
||||
if(!passwordUtility.checkCredentials(credentials, user.getPassword_hash(), user.getUsername(), user.getPassword_salt()))
|
||||
throw new GuacamoleException("No user found with the supplied credentials");
|
||||
|
||||
this.permissions = permissionCheckUtility.getAllPermissions(user.getUser_id());
|
||||
}
|
||||
|
||||
void init (User user) {
|
||||
/**
|
||||
* Create a new user from the provided information. This represents a user that has not yet been inserted.
|
||||
* @param user
|
||||
* @throws GuacamoleException
|
||||
*/
|
||||
public void initNew (User user) throws GuacamoleException {
|
||||
this.setPassword(user.getPassword());
|
||||
this.setUsername(user.getUsername());
|
||||
this.permissions = user.getPermissions();
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads a user by username.
|
||||
* @param userName
|
||||
* @throws GuacamoleException
|
||||
*/
|
||||
public void initExisting (String username) throws GuacamoleException {
|
||||
UserExample example = new UserExample();
|
||||
example.createCriteria().andUsernameEqualTo(username);
|
||||
List<UserWithBLOBs> userList = userDAO.selectByExampleWithBLOBs(example);
|
||||
if(userList.size() > 1) // this should never happen; the unique constraint should prevent it
|
||||
throw new GuacamoleException("Multiple users found with username '" + username + "'.");
|
||||
if(userList.size() == 0)
|
||||
throw new GuacamoleException("No user found with username '" + username + "'.");
|
||||
|
||||
this.user = userList.get(0);
|
||||
this.permissions = permissionCheckUtility.getAllPermissions(user.getUser_id());
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize from a database record.
|
||||
* @param user
|
||||
*/
|
||||
public void init(UserWithBLOBs user) {
|
||||
this.user = user;
|
||||
this.permissions = permissionCheckUtility.getAllPermissions(user.getUser_id());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the user id.
|
||||
* @return
|
||||
*/
|
||||
public int getUserID() {
|
||||
return user.getUser_id();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the database record held by this object.
|
||||
* @return
|
||||
*/
|
||||
public UserWithBLOBs getUser() {
|
||||
return user;
|
||||
}
|
||||
|
@@ -46,7 +46,7 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author James Muehlner
|
||||
*/
|
||||
public class MySQLUserContext implements UserContext {
|
||||
@@ -56,8 +56,11 @@ public class MySQLUserContext implements UserContext {
|
||||
@Inject
|
||||
private MySQLUser user;
|
||||
|
||||
@Inject UserDirectory userDirectory;
|
||||
|
||||
void init(Credentials credentials) throws GuacamoleException {
|
||||
user.init(credentials);
|
||||
userDirectory.init(user);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -67,7 +70,7 @@ public class MySQLUserContext implements UserContext {
|
||||
|
||||
@Override
|
||||
public Directory<String, User> getUserDirectory() throws GuacamoleException {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
return userDirectory;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -1,72 +1,400 @@
|
||||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (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.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is guacamole-auth-mysql.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* James Muehlner.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2010
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
package net.sourceforge.guacamole.net.auth.mysql;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.Provider;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import net.sourceforge.guacamole.GuacamoleException;
|
||||
import net.sourceforge.guacamole.net.auth.Directory;
|
||||
import net.sourceforge.guacamole.net.auth.User;
|
||||
import net.sourceforge.guacamole.net.auth.mysql.dao.ConnectionMapper;
|
||||
import net.sourceforge.guacamole.net.auth.mysql.dao.ConnectionPermissionMapper;
|
||||
import net.sourceforge.guacamole.net.auth.mysql.dao.SystemPermissionMapper;
|
||||
import net.sourceforge.guacamole.net.auth.mysql.dao.UserMapper;
|
||||
import net.sourceforge.guacamole.net.auth.mysql.dao.UserPermissionMapper;
|
||||
import net.sourceforge.guacamole.net.auth.mysql.model.ConnectionExample;
|
||||
import net.sourceforge.guacamole.net.auth.mysql.model.ConnectionPermissionExample;
|
||||
import net.sourceforge.guacamole.net.auth.mysql.model.ConnectionPermissionKey;
|
||||
import net.sourceforge.guacamole.net.auth.mysql.model.SystemPermissionExample;
|
||||
import net.sourceforge.guacamole.net.auth.mysql.model.SystemPermissionKey;
|
||||
import net.sourceforge.guacamole.net.auth.mysql.model.UserExample;
|
||||
import net.sourceforge.guacamole.net.auth.mysql.model.UserPermissionExample;
|
||||
import net.sourceforge.guacamole.net.auth.mysql.model.UserPermissionKey;
|
||||
import net.sourceforge.guacamole.net.auth.mysql.utility.PermissionCheckUtility;
|
||||
import net.sourceforge.guacamole.net.auth.permission.ConnectionDirectoryPermission;
|
||||
import net.sourceforge.guacamole.net.auth.permission.ConnectionPermission;
|
||||
import net.sourceforge.guacamole.net.auth.permission.Permission;
|
||||
import net.sourceforge.guacamole.net.auth.permission.SystemPermission;
|
||||
import net.sourceforge.guacamole.net.auth.permission.UserDirectoryPermission;
|
||||
import net.sourceforge.guacamole.net.auth.permission.UserPermission;
|
||||
import org.mybatis.guice.transactional.Transactional;
|
||||
|
||||
/**
|
||||
* A MySQL based implementation of the User Directory.
|
||||
* @author James Muehlner
|
||||
*/
|
||||
public class UserDirectory implements Directory<String, User> {
|
||||
|
||||
private Map<String, User> userMap = new HashMap<String, User>();
|
||||
|
||||
/**
|
||||
* The user who this user directory belongs to.
|
||||
* Access is based on his/her permission settings.
|
||||
*/
|
||||
private MySQLUser user;
|
||||
|
||||
@Inject
|
||||
UserMapper userDAO;
|
||||
|
||||
@Inject
|
||||
ConnectionMapper connectionDAO;
|
||||
|
||||
@Inject
|
||||
UserPermissionMapper userPermissionDAO;
|
||||
|
||||
@Inject
|
||||
ConnectionPermissionMapper connectionPermissionDAO;
|
||||
|
||||
@Inject
|
||||
SystemPermissionMapper systemPermissionDAO;
|
||||
|
||||
@Inject
|
||||
PermissionCheckUtility permissionCheckUtility;
|
||||
|
||||
@Inject
|
||||
Provider<MySQLUser> mySQLUserProvider;
|
||||
|
||||
private MySQLUser getMySQLUser(User user) {
|
||||
/**
|
||||
* Set the user for this directory.
|
||||
* @param user
|
||||
*/
|
||||
void init(MySQLUser user) {
|
||||
this.user = user;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new user based on the provided object.
|
||||
* @param user
|
||||
* @return
|
||||
* @throws GuacamoleException
|
||||
*/
|
||||
private MySQLUser getNewMySQLUser(User user) throws GuacamoleException {
|
||||
MySQLUser mySQLUser = mySQLUserProvider.get();
|
||||
mySQLUser.init(user);
|
||||
mySQLUser.initNew(user);
|
||||
return mySQLUser;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the user based on the username of the provided object.
|
||||
* @param user
|
||||
* @return
|
||||
* @throws GuacamoleException
|
||||
*/
|
||||
private MySQLUser getExistingMySQLUser(User user) throws GuacamoleException {
|
||||
return getExistingMySQLUser(user.getUsername());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the user based on the username of the provided object.
|
||||
* @param user
|
||||
* @return
|
||||
* @throws GuacamoleException
|
||||
*/
|
||||
private MySQLUser getExistingMySQLUser(String name) throws GuacamoleException {
|
||||
MySQLUser mySQLUser = mySQLUserProvider.get();
|
||||
mySQLUser.initExisting(name);
|
||||
return mySQLUser;
|
||||
}
|
||||
|
||||
@Transactional
|
||||
@Override
|
||||
public User get(String identifier) throws GuacamoleException {
|
||||
return userMap.get(identifier);
|
||||
return getExistingMySQLUser(identifier);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
@Override
|
||||
public Set<String> getIdentifiers() throws GuacamoleException {
|
||||
return userMap.keySet();
|
||||
Set<String> userNameSet = new HashSet<String>();
|
||||
List<MySQLUser> users = permissionCheckUtility.getReadableUsers(user.getUserID());
|
||||
for(MySQLUser mySQLUser : users) {
|
||||
userNameSet.add(mySQLUser.getUsername());
|
||||
}
|
||||
return userNameSet;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void add(User object) throws GuacamoleException {
|
||||
MySQLUser mySQLUser = getMySQLUser(object);
|
||||
Preconditions.checkNotNull(object);
|
||||
//create user in database
|
||||
MySQLUser mySQLUser = getNewMySQLUser(object);
|
||||
userDAO.insert(mySQLUser.getUser());
|
||||
userMap.put(mySQLUser.getUsername(), mySQLUser);
|
||||
|
||||
//create permissions in database
|
||||
updatePermissions(mySQLUser);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update all the permissions for a given user to be only those specified in the user object.
|
||||
* Delete any permissions not in the list, and create any in the list that do not exist
|
||||
* in the database.
|
||||
* @param user
|
||||
* @throws GuacamoleException
|
||||
*/
|
||||
private void updatePermissions(MySQLUser user) throws GuacamoleException {
|
||||
List<UserPermission> userPermissions = new ArrayList<UserPermission>();
|
||||
List<ConnectionPermission> connectionPermissions = new ArrayList<ConnectionPermission>();
|
||||
List<SystemPermission> systemPermissions = new ArrayList<SystemPermission>();
|
||||
|
||||
for(Permission permission : user.getPermissions()) {
|
||||
if(permission instanceof UserPermission)
|
||||
userPermissions.add((UserPermission)permission);
|
||||
else if(permission instanceof ConnectionPermission)
|
||||
connectionPermissions.add((ConnectionPermission)permission);
|
||||
else if(permission instanceof SystemPermission)
|
||||
systemPermissions.add((SystemPermission)permission);
|
||||
}
|
||||
|
||||
updateUserPermissions(userPermissions, user);
|
||||
updateConnectionPermissions(connectionPermissions, user);
|
||||
updateSystemPermissions(systemPermissions, user);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update all the permissions having to do with users for a given user.
|
||||
* @param permissions
|
||||
* @param user
|
||||
*/
|
||||
private void updateUserPermissions(Iterable<UserPermission> permissions, MySQLUser user) throws GuacamoleException {
|
||||
|
||||
List<String> usernames = new ArrayList<String>();
|
||||
for(UserPermission permission : permissions) {
|
||||
usernames.add(permission.getObjectIdentifier());
|
||||
}
|
||||
|
||||
// find all the users by username
|
||||
UserExample userExample = new UserExample();
|
||||
userExample.createCriteria().andUsernameIn(usernames);
|
||||
List<net.sourceforge.guacamole.net.auth.mysql.model.User> dbUsers = userDAO.selectByExample(userExample);
|
||||
List<Integer> userIDs = new ArrayList<Integer>();
|
||||
|
||||
Map<String, net.sourceforge.guacamole.net.auth.mysql.model.User> dbUserMap = new HashMap<String, net.sourceforge.guacamole.net.auth.mysql.model.User>();
|
||||
for(net.sourceforge.guacamole.net.auth.mysql.model.User dbUser : dbUsers) {
|
||||
dbUserMap.put(dbUser.getUsername(), dbUser);
|
||||
userIDs.add(dbUser.getUser_id());
|
||||
}
|
||||
|
||||
// find any user permissions that may already exist
|
||||
UserPermissionExample userPermissionExample = new UserPermissionExample();
|
||||
userPermissionExample.createCriteria().andAffected_user_idIn(userIDs);
|
||||
List<UserPermissionKey> existingPermissions = userPermissionDAO.selectByExample(userPermissionExample);
|
||||
Set<Integer> existingUserIDs = new HashSet<Integer>();
|
||||
for(UserPermissionKey userPermission : existingPermissions) {
|
||||
existingUserIDs.add(userPermission.getAffected_user_id());
|
||||
}
|
||||
|
||||
// delete any permissions that are not in the provided list
|
||||
userPermissionExample.clear();
|
||||
userPermissionExample.createCriteria().andAffected_user_idNotIn(userIDs);
|
||||
userPermissionDAO.deleteByExample(userPermissionExample);
|
||||
|
||||
// finally, insert the new permissions
|
||||
for(UserPermission permission : permissions) {
|
||||
net.sourceforge.guacamole.net.auth.mysql.model.User dbAffectedUser = dbUserMap.get(permission.getObjectIdentifier());
|
||||
if(dbAffectedUser == null)
|
||||
throw new GuacamoleException("User '" + permission.getObjectIdentifier() + "' not found.");
|
||||
|
||||
// the permission for this user already exists, we don't need to create it again
|
||||
if(existingUserIDs.contains(dbAffectedUser.getUser_id()))
|
||||
continue;
|
||||
|
||||
UserPermissionKey newPermission = new UserPermissionKey();
|
||||
newPermission.setAffected_user_id(dbAffectedUser.getUser_id());
|
||||
newPermission.setPermission(permission.getType().name());
|
||||
newPermission.setUser_id(user.getUserID());
|
||||
userPermissionDAO.insert(newPermission);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update all the permissions having to do with connections for a given user.
|
||||
* @param permissions
|
||||
* @param user
|
||||
*/
|
||||
private void updateConnectionPermissions(Iterable<ConnectionPermission> permissions, MySQLUser user) throws GuacamoleException {
|
||||
|
||||
List<String> connectionnames = new ArrayList<String>();
|
||||
for(ConnectionPermission permission : permissions) {
|
||||
connectionnames.add(permission.getObjectIdentifier());
|
||||
}
|
||||
|
||||
// find all the connections by connectionname
|
||||
ConnectionExample connectionExample = new ConnectionExample();
|
||||
connectionExample.createCriteria().andConnection_nameIn(connectionnames);
|
||||
List<net.sourceforge.guacamole.net.auth.mysql.model.Connection> dbConnections = connectionDAO.selectByExample(connectionExample);
|
||||
List<Integer> connectionIDs = new ArrayList<Integer>();
|
||||
|
||||
Map<String, net.sourceforge.guacamole.net.auth.mysql.model.Connection> dbConnectionMap = new HashMap<String, net.sourceforge.guacamole.net.auth.mysql.model.Connection>();
|
||||
for(net.sourceforge.guacamole.net.auth.mysql.model.Connection dbConnection : dbConnections) {
|
||||
dbConnectionMap.put(dbConnection.getConnection_name(), dbConnection);
|
||||
connectionIDs.add(dbConnection.getConnection_id());
|
||||
}
|
||||
|
||||
// find any connection permissions that may already exist
|
||||
ConnectionPermissionExample connectionPermissionExample = new ConnectionPermissionExample();
|
||||
connectionPermissionExample.createCriteria().andConnection_idIn(connectionIDs);
|
||||
List<ConnectionPermissionKey> existingPermissions = connectionPermissionDAO.selectByExample(connectionPermissionExample);
|
||||
Set<Integer> existingConnectionIDs = new HashSet<Integer>();
|
||||
for(ConnectionPermissionKey connectionPermission : existingPermissions) {
|
||||
existingConnectionIDs.add(connectionPermission.getConnection_id());
|
||||
}
|
||||
|
||||
// delete any permissions that are not in the provided list
|
||||
connectionPermissionExample.clear();
|
||||
connectionPermissionExample.createCriteria().andConnection_idNotIn(connectionIDs);
|
||||
connectionPermissionDAO.deleteByExample(connectionPermissionExample);
|
||||
|
||||
// finally, insert the new permissions
|
||||
for(ConnectionPermission permission : permissions) {
|
||||
net.sourceforge.guacamole.net.auth.mysql.model.Connection dbConnection = dbConnectionMap.get(permission.getObjectIdentifier());
|
||||
if(dbConnection == null)
|
||||
throw new GuacamoleException("Connection '" + permission.getObjectIdentifier() + "' not found.");
|
||||
|
||||
// the permission for this connection already exists, we don't need to create it again
|
||||
if(existingConnectionIDs.contains(dbConnection.getConnection_id()))
|
||||
continue;
|
||||
|
||||
ConnectionPermissionKey newPermission = new ConnectionPermissionKey();
|
||||
newPermission.setConnection_id(dbConnection.getConnection_id());
|
||||
newPermission.setPermission(permission.getType().name());
|
||||
newPermission.setConnection_id(user.getUserID());
|
||||
connectionPermissionDAO.insert(newPermission);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update all system permissions for a given user.
|
||||
* @param permissions
|
||||
* @param user
|
||||
*/
|
||||
private void updateSystemPermissions(Iterable<SystemPermission> permissions, MySQLUser user) {
|
||||
List<String> systemPermissionTypes = new ArrayList<String>();
|
||||
for(SystemPermission permission : permissions) {
|
||||
String operation = permission.getType().name();
|
||||
if(permission instanceof ConnectionDirectoryPermission)
|
||||
systemPermissionTypes.add(operation + "_CONNECTION");
|
||||
else if(permission instanceof UserDirectoryPermission)
|
||||
systemPermissionTypes.add(operation + "_USER");
|
||||
}
|
||||
|
||||
//delete all system permissions not in the list
|
||||
SystemPermissionExample systemPermissionExample = new SystemPermissionExample();
|
||||
systemPermissionExample.createCriteria().andUser_idEqualTo(user.getUserID()).andPermissionNotIn(systemPermissionTypes);
|
||||
systemPermissionDAO.deleteByExample(systemPermissionExample);
|
||||
|
||||
// find all existing system permissions
|
||||
systemPermissionExample.clear();
|
||||
systemPermissionExample.createCriteria().andUser_idEqualTo(user.getUserID()).andPermissionIn(systemPermissionTypes);
|
||||
List<SystemPermissionKey> existingPermissions = systemPermissionDAO.selectByExample(systemPermissionExample);
|
||||
Set<String> existingPermissionTypes = new HashSet<String>();
|
||||
for(SystemPermissionKey existingPermission : existingPermissions) {
|
||||
existingPermissionTypes.add(existingPermission.getPermission());
|
||||
}
|
||||
|
||||
// finally, insert any new system permissions for this user
|
||||
for(String systemPermissionType : systemPermissionTypes) {
|
||||
//do not insert the permission if it already exists
|
||||
if(existingPermissionTypes.contains(systemPermissionType))
|
||||
continue;
|
||||
|
||||
SystemPermissionKey newSystemPermission = new SystemPermissionKey();
|
||||
newSystemPermission.setUser_id(user.getUserID());
|
||||
newSystemPermission.setPermission(systemPermissionType);
|
||||
systemPermissionDAO.insert(newSystemPermission);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void update(User object) throws GuacamoleException {
|
||||
if(!userMap.containsKey(object.getUsername()))
|
||||
throw new GuacamoleException("User not found in Directory.");
|
||||
MySQLUser mySQLUser = getMySQLUser(object);
|
||||
//update the user in the database
|
||||
MySQLUser mySQLUser = getExistingMySQLUser(object);
|
||||
userDAO.updateByPrimaryKey(mySQLUser.getUser());
|
||||
userMap.put(object.getUsername(), mySQLUser);
|
||||
|
||||
//update permissions in database
|
||||
updatePermissions(mySQLUser);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void remove(String identifier) throws GuacamoleException {
|
||||
User user = userMap.get(identifier);
|
||||
if(user == null)
|
||||
throw new GuacamoleException("User not found in Directory.");
|
||||
MySQLUser mySQLUser = getMySQLUser(user);
|
||||
userDAO.deleteByPrimaryKey(mySQLUser.getUser().getUser_id());
|
||||
userMap.remove(user.getUsername());
|
||||
|
||||
MySQLUser mySQLUser = getExistingMySQLUser(identifier);
|
||||
|
||||
//delete all the user permissions in the database
|
||||
deleteAllPermissions(mySQLUser);
|
||||
|
||||
//delete the user in the database
|
||||
userDAO.deleteByPrimaryKey(mySQLUser.getUserID());
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete all permissions associated with the provided user.
|
||||
* @param user
|
||||
*/
|
||||
private void deleteAllPermissions(MySQLUser user) {
|
||||
//delete all user permissions
|
||||
UserPermissionExample userPermissionExample = new UserPermissionExample();
|
||||
userPermissionExample.createCriteria().andUser_idEqualTo(user.getUserID());
|
||||
userPermissionDAO.deleteByExample(userPermissionExample);
|
||||
|
||||
//delete all connection permissions
|
||||
ConnectionPermissionExample connectionPermissionExample = new ConnectionPermissionExample();
|
||||
connectionPermissionExample.createCriteria().andUser_idEqualTo(user.getUserID());
|
||||
connectionPermissionDAO.deleteByExample(connectionPermissionExample);
|
||||
|
||||
//delete all system permissions
|
||||
SystemPermissionExample systemPermissionExample = new SystemPermissionExample();
|
||||
systemPermissionExample.createCriteria().andUser_idEqualTo(user.getUserID());
|
||||
systemPermissionDAO.deleteByExample(systemPermissionExample);
|
||||
}
|
||||
}
|
||||
|
@@ -10,7 +10,7 @@ public interface ConnectionMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
int countByExample(ConnectionExample example);
|
||||
|
||||
@@ -18,7 +18,7 @@ public interface ConnectionMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
int deleteByExample(ConnectionExample example);
|
||||
|
||||
@@ -26,7 +26,7 @@ public interface ConnectionMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
int deleteByPrimaryKey(Integer connection_id);
|
||||
|
||||
@@ -34,7 +34,7 @@ public interface ConnectionMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
int insert(Connection record);
|
||||
|
||||
@@ -42,7 +42,7 @@ public interface ConnectionMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
int insertSelective(Connection record);
|
||||
|
||||
@@ -50,7 +50,7 @@ public interface ConnectionMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
List<Connection> selectByExample(ConnectionExample example);
|
||||
|
||||
@@ -58,7 +58,7 @@ public interface ConnectionMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
Connection selectByPrimaryKey(Integer connection_id);
|
||||
|
||||
@@ -66,7 +66,7 @@ public interface ConnectionMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
int updateByExampleSelective(@Param("record") Connection record, @Param("example") ConnectionExample example);
|
||||
|
||||
@@ -74,7 +74,7 @@ public interface ConnectionMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
int updateByExample(@Param("record") Connection record, @Param("example") ConnectionExample example);
|
||||
|
||||
@@ -82,7 +82,7 @@ public interface ConnectionMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
int updateByPrimaryKeySelective(Connection record);
|
||||
|
||||
@@ -90,7 +90,7 @@ public interface ConnectionMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
int updateByPrimaryKey(Connection record);
|
||||
}
|
@@ -11,7 +11,7 @@ public interface ConnectionParameterMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection_parameter
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
int countByExample(ConnectionParameterExample example);
|
||||
|
||||
@@ -19,7 +19,7 @@ public interface ConnectionParameterMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection_parameter
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
int deleteByExample(ConnectionParameterExample example);
|
||||
|
||||
@@ -27,7 +27,7 @@ public interface ConnectionParameterMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection_parameter
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
int deleteByPrimaryKey(ConnectionParameterKey key);
|
||||
|
||||
@@ -35,7 +35,7 @@ public interface ConnectionParameterMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection_parameter
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
int insert(ConnectionParameter record);
|
||||
|
||||
@@ -43,7 +43,7 @@ public interface ConnectionParameterMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection_parameter
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
int insertSelective(ConnectionParameter record);
|
||||
|
||||
@@ -51,7 +51,7 @@ public interface ConnectionParameterMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection_parameter
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
List<ConnectionParameter> selectByExample(ConnectionParameterExample example);
|
||||
|
||||
@@ -59,7 +59,7 @@ public interface ConnectionParameterMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection_parameter
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
ConnectionParameter selectByPrimaryKey(ConnectionParameterKey key);
|
||||
|
||||
@@ -67,7 +67,7 @@ public interface ConnectionParameterMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection_parameter
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
int updateByExampleSelective(@Param("record") ConnectionParameter record, @Param("example") ConnectionParameterExample example);
|
||||
|
||||
@@ -75,7 +75,7 @@ public interface ConnectionParameterMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection_parameter
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
int updateByExample(@Param("record") ConnectionParameter record, @Param("example") ConnectionParameterExample example);
|
||||
|
||||
@@ -83,7 +83,7 @@ public interface ConnectionParameterMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection_parameter
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
int updateByPrimaryKeySelective(ConnectionParameter record);
|
||||
|
||||
@@ -91,7 +91,7 @@ public interface ConnectionParameterMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection_parameter
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
int updateByPrimaryKey(ConnectionParameter record);
|
||||
}
|
@@ -10,7 +10,7 @@ public interface ConnectionPermissionMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
int countByExample(ConnectionPermissionExample example);
|
||||
|
||||
@@ -18,7 +18,7 @@ public interface ConnectionPermissionMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
int deleteByExample(ConnectionPermissionExample example);
|
||||
|
||||
@@ -26,7 +26,7 @@ public interface ConnectionPermissionMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
int deleteByPrimaryKey(ConnectionPermissionKey key);
|
||||
|
||||
@@ -34,7 +34,7 @@ public interface ConnectionPermissionMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
int insert(ConnectionPermissionKey record);
|
||||
|
||||
@@ -42,7 +42,7 @@ public interface ConnectionPermissionMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
int insertSelective(ConnectionPermissionKey record);
|
||||
|
||||
@@ -50,7 +50,7 @@ public interface ConnectionPermissionMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
List<ConnectionPermissionKey> selectByExample(ConnectionPermissionExample example);
|
||||
|
||||
@@ -58,7 +58,7 @@ public interface ConnectionPermissionMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
int updateByExampleSelective(@Param("record") ConnectionPermissionKey record, @Param("example") ConnectionPermissionExample example);
|
||||
|
||||
@@ -66,7 +66,7 @@ public interface ConnectionPermissionMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
int updateByExample(@Param("record") ConnectionPermissionKey record, @Param("example") ConnectionPermissionExample example);
|
||||
}
|
@@ -10,7 +10,7 @@ public interface SystemPermissionMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_system_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
int countByExample(SystemPermissionExample example);
|
||||
|
||||
@@ -18,7 +18,7 @@ public interface SystemPermissionMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_system_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
int deleteByExample(SystemPermissionExample example);
|
||||
|
||||
@@ -26,7 +26,7 @@ public interface SystemPermissionMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_system_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
int deleteByPrimaryKey(SystemPermissionKey key);
|
||||
|
||||
@@ -34,7 +34,7 @@ public interface SystemPermissionMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_system_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
int insert(SystemPermissionKey record);
|
||||
|
||||
@@ -42,7 +42,7 @@ public interface SystemPermissionMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_system_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
int insertSelective(SystemPermissionKey record);
|
||||
|
||||
@@ -50,7 +50,7 @@ public interface SystemPermissionMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_system_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
List<SystemPermissionKey> selectByExample(SystemPermissionExample example);
|
||||
|
||||
@@ -58,7 +58,7 @@ public interface SystemPermissionMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_system_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
int updateByExampleSelective(@Param("record") SystemPermissionKey record, @Param("example") SystemPermissionExample example);
|
||||
|
||||
@@ -66,7 +66,7 @@ public interface SystemPermissionMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_system_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
int updateByExample(@Param("record") SystemPermissionKey record, @Param("example") SystemPermissionExample example);
|
||||
}
|
@@ -11,7 +11,7 @@ public interface UserMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_user
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
int countByExample(UserExample example);
|
||||
|
||||
@@ -19,7 +19,7 @@ public interface UserMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_user
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
int deleteByExample(UserExample example);
|
||||
|
||||
@@ -27,7 +27,7 @@ public interface UserMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_user
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
int deleteByPrimaryKey(Integer user_id);
|
||||
|
||||
@@ -35,7 +35,7 @@ public interface UserMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_user
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
int insert(UserWithBLOBs record);
|
||||
|
||||
@@ -43,7 +43,7 @@ public interface UserMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_user
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
int insertSelective(UserWithBLOBs record);
|
||||
|
||||
@@ -51,7 +51,7 @@ public interface UserMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_user
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
List<UserWithBLOBs> selectByExampleWithBLOBs(UserExample example);
|
||||
|
||||
@@ -59,7 +59,7 @@ public interface UserMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_user
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
List<User> selectByExample(UserExample example);
|
||||
|
||||
@@ -67,7 +67,7 @@ public interface UserMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_user
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
UserWithBLOBs selectByPrimaryKey(Integer user_id);
|
||||
|
||||
@@ -75,7 +75,7 @@ public interface UserMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_user
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
int updateByExampleSelective(@Param("record") UserWithBLOBs record, @Param("example") UserExample example);
|
||||
|
||||
@@ -83,7 +83,7 @@ public interface UserMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_user
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
int updateByExampleWithBLOBs(@Param("record") UserWithBLOBs record, @Param("example") UserExample example);
|
||||
|
||||
@@ -91,7 +91,7 @@ public interface UserMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_user
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
int updateByExample(@Param("record") User record, @Param("example") UserExample example);
|
||||
|
||||
@@ -99,7 +99,7 @@ public interface UserMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_user
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
int updateByPrimaryKeySelective(UserWithBLOBs record);
|
||||
|
||||
@@ -107,7 +107,7 @@ public interface UserMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_user
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
int updateByPrimaryKeyWithBLOBs(UserWithBLOBs record);
|
||||
|
||||
@@ -115,7 +115,7 @@ public interface UserMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_user
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
int updateByPrimaryKey(User record);
|
||||
}
|
@@ -10,7 +10,7 @@ public interface UserPermissionMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_user_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
int countByExample(UserPermissionExample example);
|
||||
|
||||
@@ -18,7 +18,7 @@ public interface UserPermissionMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_user_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
int deleteByExample(UserPermissionExample example);
|
||||
|
||||
@@ -26,7 +26,7 @@ public interface UserPermissionMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_user_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
int deleteByPrimaryKey(UserPermissionKey key);
|
||||
|
||||
@@ -34,7 +34,7 @@ public interface UserPermissionMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_user_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
int insert(UserPermissionKey record);
|
||||
|
||||
@@ -42,7 +42,7 @@ public interface UserPermissionMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_user_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
int insertSelective(UserPermissionKey record);
|
||||
|
||||
@@ -50,7 +50,7 @@ public interface UserPermissionMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_user_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
List<UserPermissionKey> selectByExample(UserPermissionExample example);
|
||||
|
||||
@@ -58,7 +58,7 @@ public interface UserPermissionMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_user_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
int updateByExampleSelective(@Param("record") UserPermissionKey record, @Param("example") UserPermissionExample example);
|
||||
|
||||
@@ -66,7 +66,7 @@ public interface UserPermissionMapper {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_user_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
int updateByExample(@Param("record") UserPermissionKey record, @Param("example") UserPermissionExample example);
|
||||
}
|
@@ -5,7 +5,7 @@ public class Connection {
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column guacamole..guacamole_connection.connection_id
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
private Integer connection_id;
|
||||
|
||||
@@ -13,7 +13,7 @@ public class Connection {
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column guacamole..guacamole_connection.connection_name
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
private String connection_name;
|
||||
|
||||
@@ -21,7 +21,7 @@ public class Connection {
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column guacamole..guacamole_connection.protocol
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
private String protocol;
|
||||
|
||||
@@ -31,7 +31,7 @@ public class Connection {
|
||||
*
|
||||
* @return the value of guacamole..guacamole_connection.connection_id
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public Integer getConnection_id() {
|
||||
return connection_id;
|
||||
@@ -43,7 +43,7 @@ public class Connection {
|
||||
*
|
||||
* @param connection_id the value for guacamole..guacamole_connection.connection_id
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public void setConnection_id(Integer connection_id) {
|
||||
this.connection_id = connection_id;
|
||||
@@ -55,7 +55,7 @@ public class Connection {
|
||||
*
|
||||
* @return the value of guacamole..guacamole_connection.connection_name
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public String getConnection_name() {
|
||||
return connection_name;
|
||||
@@ -67,7 +67,7 @@ public class Connection {
|
||||
*
|
||||
* @param connection_name the value for guacamole..guacamole_connection.connection_name
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public void setConnection_name(String connection_name) {
|
||||
this.connection_name = connection_name;
|
||||
@@ -79,7 +79,7 @@ public class Connection {
|
||||
*
|
||||
* @return the value of guacamole..guacamole_connection.protocol
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public String getProtocol() {
|
||||
return protocol;
|
||||
@@ -91,7 +91,7 @@ public class Connection {
|
||||
*
|
||||
* @param protocol the value for guacamole..guacamole_connection.protocol
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public void setProtocol(String protocol) {
|
||||
this.protocol = protocol;
|
||||
|
@@ -8,7 +8,7 @@ public class ConnectionExample {
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database table guacamole..guacamole_connection
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
protected String orderByClause;
|
||||
|
||||
@@ -16,7 +16,7 @@ public class ConnectionExample {
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database table guacamole..guacamole_connection
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
protected boolean distinct;
|
||||
|
||||
@@ -24,7 +24,7 @@ public class ConnectionExample {
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database table guacamole..guacamole_connection
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
@@ -32,7 +32,7 @@ public class ConnectionExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public ConnectionExample() {
|
||||
oredCriteria = new ArrayList<Criteria>();
|
||||
@@ -42,7 +42,7 @@ public class ConnectionExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
@@ -52,7 +52,7 @@ public class ConnectionExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
@@ -62,7 +62,7 @@ public class ConnectionExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
@@ -72,7 +72,7 @@ public class ConnectionExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
@@ -82,7 +82,7 @@ public class ConnectionExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public List<Criteria> getOredCriteria() {
|
||||
return oredCriteria;
|
||||
@@ -92,7 +92,7 @@ public class ConnectionExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public void or(Criteria criteria) {
|
||||
oredCriteria.add(criteria);
|
||||
@@ -102,7 +102,7 @@ public class ConnectionExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public Criteria or() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
@@ -114,7 +114,7 @@ public class ConnectionExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
@@ -128,7 +128,7 @@ public class ConnectionExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
@@ -139,7 +139,7 @@ public class ConnectionExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
@@ -151,7 +151,7 @@ public class ConnectionExample {
|
||||
* This class was generated by MyBatis Generator.
|
||||
* This class corresponds to the database table guacamole..guacamole_connection
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
protected abstract static class GeneratedCriteria {
|
||||
protected List<Criterion> criteria;
|
||||
@@ -399,7 +399,7 @@ public class ConnectionExample {
|
||||
* This class was generated by MyBatis Generator.
|
||||
* This class corresponds to the database table guacamole..guacamole_connection
|
||||
*
|
||||
* @mbggenerated do_not_delete_during_merge Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated do_not_delete_during_merge Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
||||
@@ -412,7 +412,7 @@ public class ConnectionExample {
|
||||
* This class was generated by MyBatis Generator.
|
||||
* This class corresponds to the database table guacamole..guacamole_connection
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public static class Criterion {
|
||||
private String condition;
|
||||
|
@@ -5,7 +5,7 @@ public class ConnectionParameter extends ConnectionParameterKey {
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column guacamole..guacamole_connection_parameter.parameter_value
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
private String parameter_value;
|
||||
|
||||
@@ -15,7 +15,7 @@ public class ConnectionParameter extends ConnectionParameterKey {
|
||||
*
|
||||
* @return the value of guacamole..guacamole_connection_parameter.parameter_value
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public String getParameter_value() {
|
||||
return parameter_value;
|
||||
@@ -27,7 +27,7 @@ public class ConnectionParameter extends ConnectionParameterKey {
|
||||
*
|
||||
* @param parameter_value the value for guacamole..guacamole_connection_parameter.parameter_value
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public void setParameter_value(String parameter_value) {
|
||||
this.parameter_value = parameter_value;
|
||||
|
@@ -8,7 +8,7 @@ public class ConnectionParameterExample {
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database table guacamole..guacamole_connection_parameter
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
protected String orderByClause;
|
||||
|
||||
@@ -16,7 +16,7 @@ public class ConnectionParameterExample {
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database table guacamole..guacamole_connection_parameter
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
protected boolean distinct;
|
||||
|
||||
@@ -24,7 +24,7 @@ public class ConnectionParameterExample {
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database table guacamole..guacamole_connection_parameter
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
@@ -32,7 +32,7 @@ public class ConnectionParameterExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection_parameter
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public ConnectionParameterExample() {
|
||||
oredCriteria = new ArrayList<Criteria>();
|
||||
@@ -42,7 +42,7 @@ public class ConnectionParameterExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection_parameter
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
@@ -52,7 +52,7 @@ public class ConnectionParameterExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection_parameter
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
@@ -62,7 +62,7 @@ public class ConnectionParameterExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection_parameter
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
@@ -72,7 +72,7 @@ public class ConnectionParameterExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection_parameter
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
@@ -82,7 +82,7 @@ public class ConnectionParameterExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection_parameter
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public List<Criteria> getOredCriteria() {
|
||||
return oredCriteria;
|
||||
@@ -92,7 +92,7 @@ public class ConnectionParameterExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection_parameter
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public void or(Criteria criteria) {
|
||||
oredCriteria.add(criteria);
|
||||
@@ -102,7 +102,7 @@ public class ConnectionParameterExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection_parameter
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public Criteria or() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
@@ -114,7 +114,7 @@ public class ConnectionParameterExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection_parameter
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
@@ -128,7 +128,7 @@ public class ConnectionParameterExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection_parameter
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
@@ -139,7 +139,7 @@ public class ConnectionParameterExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection_parameter
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
@@ -151,7 +151,7 @@ public class ConnectionParameterExample {
|
||||
* This class was generated by MyBatis Generator.
|
||||
* This class corresponds to the database table guacamole..guacamole_connection_parameter
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
protected abstract static class GeneratedCriteria {
|
||||
protected List<Criterion> criteria;
|
||||
@@ -399,7 +399,7 @@ public class ConnectionParameterExample {
|
||||
* This class was generated by MyBatis Generator.
|
||||
* This class corresponds to the database table guacamole..guacamole_connection_parameter
|
||||
*
|
||||
* @mbggenerated do_not_delete_during_merge Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated do_not_delete_during_merge Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
||||
@@ -412,7 +412,7 @@ public class ConnectionParameterExample {
|
||||
* This class was generated by MyBatis Generator.
|
||||
* This class corresponds to the database table guacamole..guacamole_connection_parameter
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public static class Criterion {
|
||||
private String condition;
|
||||
|
@@ -5,7 +5,7 @@ public class ConnectionParameterKey {
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column guacamole..guacamole_connection_parameter.connection_id
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
private Integer connection_id;
|
||||
|
||||
@@ -13,7 +13,7 @@ public class ConnectionParameterKey {
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column guacamole..guacamole_connection_parameter.parameter_name
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
private String parameter_name;
|
||||
|
||||
@@ -23,7 +23,7 @@ public class ConnectionParameterKey {
|
||||
*
|
||||
* @return the value of guacamole..guacamole_connection_parameter.connection_id
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public Integer getConnection_id() {
|
||||
return connection_id;
|
||||
@@ -35,7 +35,7 @@ public class ConnectionParameterKey {
|
||||
*
|
||||
* @param connection_id the value for guacamole..guacamole_connection_parameter.connection_id
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public void setConnection_id(Integer connection_id) {
|
||||
this.connection_id = connection_id;
|
||||
@@ -47,7 +47,7 @@ public class ConnectionParameterKey {
|
||||
*
|
||||
* @return the value of guacamole..guacamole_connection_parameter.parameter_name
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public String getParameter_name() {
|
||||
return parameter_name;
|
||||
@@ -59,7 +59,7 @@ public class ConnectionParameterKey {
|
||||
*
|
||||
* @param parameter_name the value for guacamole..guacamole_connection_parameter.parameter_name
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public void setParameter_name(String parameter_name) {
|
||||
this.parameter_name = parameter_name;
|
||||
|
@@ -8,7 +8,7 @@ public class ConnectionPermissionExample {
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database table guacamole..guacamole_connection_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
protected String orderByClause;
|
||||
|
||||
@@ -16,7 +16,7 @@ public class ConnectionPermissionExample {
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database table guacamole..guacamole_connection_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
protected boolean distinct;
|
||||
|
||||
@@ -24,7 +24,7 @@ public class ConnectionPermissionExample {
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database table guacamole..guacamole_connection_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
@@ -32,7 +32,7 @@ public class ConnectionPermissionExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public ConnectionPermissionExample() {
|
||||
oredCriteria = new ArrayList<Criteria>();
|
||||
@@ -42,7 +42,7 @@ public class ConnectionPermissionExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
@@ -52,7 +52,7 @@ public class ConnectionPermissionExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
@@ -62,7 +62,7 @@ public class ConnectionPermissionExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
@@ -72,7 +72,7 @@ public class ConnectionPermissionExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
@@ -82,7 +82,7 @@ public class ConnectionPermissionExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public List<Criteria> getOredCriteria() {
|
||||
return oredCriteria;
|
||||
@@ -92,7 +92,7 @@ public class ConnectionPermissionExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public void or(Criteria criteria) {
|
||||
oredCriteria.add(criteria);
|
||||
@@ -102,7 +102,7 @@ public class ConnectionPermissionExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public Criteria or() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
@@ -114,7 +114,7 @@ public class ConnectionPermissionExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
@@ -128,7 +128,7 @@ public class ConnectionPermissionExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
@@ -139,7 +139,7 @@ public class ConnectionPermissionExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_connection_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
@@ -151,7 +151,7 @@ public class ConnectionPermissionExample {
|
||||
* This class was generated by MyBatis Generator.
|
||||
* This class corresponds to the database table guacamole..guacamole_connection_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
protected abstract static class GeneratedCriteria {
|
||||
protected List<Criterion> criteria;
|
||||
@@ -389,7 +389,7 @@ public class ConnectionPermissionExample {
|
||||
* This class was generated by MyBatis Generator.
|
||||
* This class corresponds to the database table guacamole..guacamole_connection_permission
|
||||
*
|
||||
* @mbggenerated do_not_delete_during_merge Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated do_not_delete_during_merge Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
||||
@@ -402,7 +402,7 @@ public class ConnectionPermissionExample {
|
||||
* This class was generated by MyBatis Generator.
|
||||
* This class corresponds to the database table guacamole..guacamole_connection_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public static class Criterion {
|
||||
private String condition;
|
||||
|
@@ -5,7 +5,7 @@ public class ConnectionPermissionKey {
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column guacamole..guacamole_connection_permission.user_id
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
private Integer user_id;
|
||||
|
||||
@@ -13,7 +13,7 @@ public class ConnectionPermissionKey {
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column guacamole..guacamole_connection_permission.connection_id
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
private Integer connection_id;
|
||||
|
||||
@@ -21,7 +21,7 @@ public class ConnectionPermissionKey {
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column guacamole..guacamole_connection_permission.permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
private String permission;
|
||||
|
||||
@@ -31,7 +31,7 @@ public class ConnectionPermissionKey {
|
||||
*
|
||||
* @return the value of guacamole..guacamole_connection_permission.user_id
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public Integer getUser_id() {
|
||||
return user_id;
|
||||
@@ -43,7 +43,7 @@ public class ConnectionPermissionKey {
|
||||
*
|
||||
* @param user_id the value for guacamole..guacamole_connection_permission.user_id
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public void setUser_id(Integer user_id) {
|
||||
this.user_id = user_id;
|
||||
@@ -55,7 +55,7 @@ public class ConnectionPermissionKey {
|
||||
*
|
||||
* @return the value of guacamole..guacamole_connection_permission.connection_id
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public Integer getConnection_id() {
|
||||
return connection_id;
|
||||
@@ -67,7 +67,7 @@ public class ConnectionPermissionKey {
|
||||
*
|
||||
* @param connection_id the value for guacamole..guacamole_connection_permission.connection_id
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public void setConnection_id(Integer connection_id) {
|
||||
this.connection_id = connection_id;
|
||||
@@ -79,7 +79,7 @@ public class ConnectionPermissionKey {
|
||||
*
|
||||
* @return the value of guacamole..guacamole_connection_permission.permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public String getPermission() {
|
||||
return permission;
|
||||
@@ -91,7 +91,7 @@ public class ConnectionPermissionKey {
|
||||
*
|
||||
* @param permission the value for guacamole..guacamole_connection_permission.permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public void setPermission(String permission) {
|
||||
this.permission = permission;
|
||||
|
@@ -8,7 +8,7 @@ public class SystemPermissionExample {
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database table guacamole..guacamole_system_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
protected String orderByClause;
|
||||
|
||||
@@ -16,7 +16,7 @@ public class SystemPermissionExample {
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database table guacamole..guacamole_system_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
protected boolean distinct;
|
||||
|
||||
@@ -24,7 +24,7 @@ public class SystemPermissionExample {
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database table guacamole..guacamole_system_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
@@ -32,7 +32,7 @@ public class SystemPermissionExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_system_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public SystemPermissionExample() {
|
||||
oredCriteria = new ArrayList<Criteria>();
|
||||
@@ -42,7 +42,7 @@ public class SystemPermissionExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_system_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
@@ -52,7 +52,7 @@ public class SystemPermissionExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_system_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
@@ -62,7 +62,7 @@ public class SystemPermissionExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_system_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
@@ -72,7 +72,7 @@ public class SystemPermissionExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_system_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
@@ -82,7 +82,7 @@ public class SystemPermissionExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_system_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public List<Criteria> getOredCriteria() {
|
||||
return oredCriteria;
|
||||
@@ -92,7 +92,7 @@ public class SystemPermissionExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_system_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public void or(Criteria criteria) {
|
||||
oredCriteria.add(criteria);
|
||||
@@ -102,7 +102,7 @@ public class SystemPermissionExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_system_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public Criteria or() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
@@ -114,7 +114,7 @@ public class SystemPermissionExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_system_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
@@ -128,7 +128,7 @@ public class SystemPermissionExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_system_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
@@ -139,7 +139,7 @@ public class SystemPermissionExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_system_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
@@ -151,7 +151,7 @@ public class SystemPermissionExample {
|
||||
* This class was generated by MyBatis Generator.
|
||||
* This class corresponds to the database table guacamole..guacamole_system_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
protected abstract static class GeneratedCriteria {
|
||||
protected List<Criterion> criteria;
|
||||
@@ -329,7 +329,7 @@ public class SystemPermissionExample {
|
||||
* This class was generated by MyBatis Generator.
|
||||
* This class corresponds to the database table guacamole..guacamole_system_permission
|
||||
*
|
||||
* @mbggenerated do_not_delete_during_merge Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated do_not_delete_during_merge Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
||||
@@ -342,7 +342,7 @@ public class SystemPermissionExample {
|
||||
* This class was generated by MyBatis Generator.
|
||||
* This class corresponds to the database table guacamole..guacamole_system_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public static class Criterion {
|
||||
private String condition;
|
||||
|
@@ -5,7 +5,7 @@ public class SystemPermissionKey {
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column guacamole..guacamole_system_permission.user_id
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
private Integer user_id;
|
||||
|
||||
@@ -13,7 +13,7 @@ public class SystemPermissionKey {
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column guacamole..guacamole_system_permission.permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
private String permission;
|
||||
|
||||
@@ -23,7 +23,7 @@ public class SystemPermissionKey {
|
||||
*
|
||||
* @return the value of guacamole..guacamole_system_permission.user_id
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public Integer getUser_id() {
|
||||
return user_id;
|
||||
@@ -35,7 +35,7 @@ public class SystemPermissionKey {
|
||||
*
|
||||
* @param user_id the value for guacamole..guacamole_system_permission.user_id
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public void setUser_id(Integer user_id) {
|
||||
this.user_id = user_id;
|
||||
@@ -47,7 +47,7 @@ public class SystemPermissionKey {
|
||||
*
|
||||
* @return the value of guacamole..guacamole_system_permission.permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public String getPermission() {
|
||||
return permission;
|
||||
@@ -59,7 +59,7 @@ public class SystemPermissionKey {
|
||||
*
|
||||
* @param permission the value for guacamole..guacamole_system_permission.permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public void setPermission(String permission) {
|
||||
this.permission = permission;
|
||||
|
@@ -5,7 +5,7 @@ public class User {
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column guacamole..guacamole_user.user_id
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
private Integer user_id;
|
||||
|
||||
@@ -13,7 +13,7 @@ public class User {
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column guacamole..guacamole_user.username
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
private String username;
|
||||
|
||||
@@ -23,7 +23,7 @@ public class User {
|
||||
*
|
||||
* @return the value of guacamole..guacamole_user.user_id
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public Integer getUser_id() {
|
||||
return user_id;
|
||||
@@ -35,7 +35,7 @@ public class User {
|
||||
*
|
||||
* @param user_id the value for guacamole..guacamole_user.user_id
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public void setUser_id(Integer user_id) {
|
||||
this.user_id = user_id;
|
||||
@@ -47,7 +47,7 @@ public class User {
|
||||
*
|
||||
* @return the value of guacamole..guacamole_user.username
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public String getUsername() {
|
||||
return username;
|
||||
@@ -59,7 +59,7 @@ public class User {
|
||||
*
|
||||
* @param username the value for guacamole..guacamole_user.username
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
|
@@ -8,7 +8,7 @@ public class UserExample {
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database table guacamole..guacamole_user
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
protected String orderByClause;
|
||||
|
||||
@@ -16,7 +16,7 @@ public class UserExample {
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database table guacamole..guacamole_user
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
protected boolean distinct;
|
||||
|
||||
@@ -24,7 +24,7 @@ public class UserExample {
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database table guacamole..guacamole_user
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
@@ -32,7 +32,7 @@ public class UserExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_user
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public UserExample() {
|
||||
oredCriteria = new ArrayList<Criteria>();
|
||||
@@ -42,7 +42,7 @@ public class UserExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_user
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
@@ -52,7 +52,7 @@ public class UserExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_user
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
@@ -62,7 +62,7 @@ public class UserExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_user
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
@@ -72,7 +72,7 @@ public class UserExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_user
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
@@ -82,7 +82,7 @@ public class UserExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_user
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public List<Criteria> getOredCriteria() {
|
||||
return oredCriteria;
|
||||
@@ -92,7 +92,7 @@ public class UserExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_user
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public void or(Criteria criteria) {
|
||||
oredCriteria.add(criteria);
|
||||
@@ -102,7 +102,7 @@ public class UserExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_user
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public Criteria or() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
@@ -114,7 +114,7 @@ public class UserExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_user
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
@@ -128,7 +128,7 @@ public class UserExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_user
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
@@ -139,7 +139,7 @@ public class UserExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_user
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
@@ -151,7 +151,7 @@ public class UserExample {
|
||||
* This class was generated by MyBatis Generator.
|
||||
* This class corresponds to the database table guacamole..guacamole_user
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
protected abstract static class GeneratedCriteria {
|
||||
protected List<Criterion> criteria;
|
||||
@@ -329,7 +329,7 @@ public class UserExample {
|
||||
* This class was generated by MyBatis Generator.
|
||||
* This class corresponds to the database table guacamole..guacamole_user
|
||||
*
|
||||
* @mbggenerated do_not_delete_during_merge Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated do_not_delete_during_merge Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
||||
@@ -342,7 +342,7 @@ public class UserExample {
|
||||
* This class was generated by MyBatis Generator.
|
||||
* This class corresponds to the database table guacamole..guacamole_user
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public static class Criterion {
|
||||
private String condition;
|
||||
|
@@ -8,7 +8,7 @@ public class UserPermissionExample {
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database table guacamole..guacamole_user_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
protected String orderByClause;
|
||||
|
||||
@@ -16,7 +16,7 @@ public class UserPermissionExample {
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database table guacamole..guacamole_user_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
protected boolean distinct;
|
||||
|
||||
@@ -24,7 +24,7 @@ public class UserPermissionExample {
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database table guacamole..guacamole_user_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
@@ -32,7 +32,7 @@ public class UserPermissionExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_user_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public UserPermissionExample() {
|
||||
oredCriteria = new ArrayList<Criteria>();
|
||||
@@ -42,7 +42,7 @@ public class UserPermissionExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_user_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
@@ -52,7 +52,7 @@ public class UserPermissionExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_user_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
@@ -62,7 +62,7 @@ public class UserPermissionExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_user_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
@@ -72,7 +72,7 @@ public class UserPermissionExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_user_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
@@ -82,7 +82,7 @@ public class UserPermissionExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_user_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public List<Criteria> getOredCriteria() {
|
||||
return oredCriteria;
|
||||
@@ -92,7 +92,7 @@ public class UserPermissionExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_user_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public void or(Criteria criteria) {
|
||||
oredCriteria.add(criteria);
|
||||
@@ -102,7 +102,7 @@ public class UserPermissionExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_user_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public Criteria or() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
@@ -114,7 +114,7 @@ public class UserPermissionExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_user_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
@@ -128,7 +128,7 @@ public class UserPermissionExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_user_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
@@ -139,7 +139,7 @@ public class UserPermissionExample {
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table guacamole..guacamole_user_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
@@ -151,7 +151,7 @@ public class UserPermissionExample {
|
||||
* This class was generated by MyBatis Generator.
|
||||
* This class corresponds to the database table guacamole..guacamole_user_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
protected abstract static class GeneratedCriteria {
|
||||
protected List<Criterion> criteria;
|
||||
@@ -389,7 +389,7 @@ public class UserPermissionExample {
|
||||
* This class was generated by MyBatis Generator.
|
||||
* This class corresponds to the database table guacamole..guacamole_user_permission
|
||||
*
|
||||
* @mbggenerated do_not_delete_during_merge Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated do_not_delete_during_merge Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
||||
@@ -402,7 +402,7 @@ public class UserPermissionExample {
|
||||
* This class was generated by MyBatis Generator.
|
||||
* This class corresponds to the database table guacamole..guacamole_user_permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public static class Criterion {
|
||||
private String condition;
|
||||
|
@@ -5,7 +5,7 @@ public class UserPermissionKey {
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column guacamole..guacamole_user_permission.user_id
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
private Integer user_id;
|
||||
|
||||
@@ -13,7 +13,7 @@ public class UserPermissionKey {
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column guacamole..guacamole_user_permission.affected_user_id
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
private Integer affected_user_id;
|
||||
|
||||
@@ -21,7 +21,7 @@ public class UserPermissionKey {
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column guacamole..guacamole_user_permission.permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
private String permission;
|
||||
|
||||
@@ -31,7 +31,7 @@ public class UserPermissionKey {
|
||||
*
|
||||
* @return the value of guacamole..guacamole_user_permission.user_id
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public Integer getUser_id() {
|
||||
return user_id;
|
||||
@@ -43,7 +43,7 @@ public class UserPermissionKey {
|
||||
*
|
||||
* @param user_id the value for guacamole..guacamole_user_permission.user_id
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public void setUser_id(Integer user_id) {
|
||||
this.user_id = user_id;
|
||||
@@ -55,7 +55,7 @@ public class UserPermissionKey {
|
||||
*
|
||||
* @return the value of guacamole..guacamole_user_permission.affected_user_id
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public Integer getAffected_user_id() {
|
||||
return affected_user_id;
|
||||
@@ -67,7 +67,7 @@ public class UserPermissionKey {
|
||||
*
|
||||
* @param affected_user_id the value for guacamole..guacamole_user_permission.affected_user_id
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public void setAffected_user_id(Integer affected_user_id) {
|
||||
this.affected_user_id = affected_user_id;
|
||||
@@ -79,7 +79,7 @@ public class UserPermissionKey {
|
||||
*
|
||||
* @return the value of guacamole..guacamole_user_permission.permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public String getPermission() {
|
||||
return permission;
|
||||
@@ -91,7 +91,7 @@ public class UserPermissionKey {
|
||||
*
|
||||
* @param permission the value for guacamole..guacamole_user_permission.permission
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public void setPermission(String permission) {
|
||||
this.permission = permission;
|
||||
|
@@ -5,7 +5,7 @@ public class UserWithBLOBs extends User {
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column guacamole..guacamole_user.password_hash
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
private byte[] password_hash;
|
||||
|
||||
@@ -13,7 +13,7 @@ public class UserWithBLOBs extends User {
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column guacamole..guacamole_user.password_salt
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
private byte[] password_salt;
|
||||
|
||||
@@ -23,7 +23,7 @@ public class UserWithBLOBs extends User {
|
||||
*
|
||||
* @return the value of guacamole..guacamole_user.password_hash
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public byte[] getPassword_hash() {
|
||||
return password_hash;
|
||||
@@ -35,7 +35,7 @@ public class UserWithBLOBs extends User {
|
||||
*
|
||||
* @param password_hash the value for guacamole..guacamole_user.password_hash
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public void setPassword_hash(byte[] password_hash) {
|
||||
this.password_hash = password_hash;
|
||||
@@ -47,7 +47,7 @@ public class UserWithBLOBs extends User {
|
||||
*
|
||||
* @return the value of guacamole..guacamole_user.password_salt
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public byte[] getPassword_salt() {
|
||||
return password_salt;
|
||||
@@ -59,7 +59,7 @@ public class UserWithBLOBs extends User {
|
||||
*
|
||||
* @param password_salt the value for guacamole..guacamole_user.password_salt
|
||||
*
|
||||
* @mbggenerated Tue Feb 12 10:51:12 PST 2013
|
||||
* @mbggenerated Tue Feb 12 20:35:54 PST 2013
|
||||
*/
|
||||
public void setPassword_salt(byte[] password_salt) {
|
||||
this.password_salt = password_salt;
|
||||
|
@@ -0,0 +1,511 @@
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (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.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is guacamole-auth-mysql.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* James Muehlner.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2010
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
package net.sourceforge.guacamole.net.auth.mysql.utility;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.Provider;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import net.sourceforge.guacamole.net.auth.mysql.MySQLConnection;
|
||||
import net.sourceforge.guacamole.net.auth.mysql.MySQLConstants;
|
||||
import net.sourceforge.guacamole.net.auth.mysql.MySQLUser;
|
||||
import net.sourceforge.guacamole.net.auth.mysql.dao.ConnectionMapper;
|
||||
import net.sourceforge.guacamole.net.auth.mysql.dao.ConnectionPermissionMapper;
|
||||
import net.sourceforge.guacamole.net.auth.mysql.dao.SystemPermissionMapper;
|
||||
import net.sourceforge.guacamole.net.auth.mysql.dao.UserMapper;
|
||||
import net.sourceforge.guacamole.net.auth.mysql.dao.UserPermissionMapper;
|
||||
import net.sourceforge.guacamole.net.auth.mysql.model.Connection;
|
||||
import net.sourceforge.guacamole.net.auth.mysql.model.ConnectionExample;
|
||||
import net.sourceforge.guacamole.net.auth.mysql.model.ConnectionPermissionExample;
|
||||
import net.sourceforge.guacamole.net.auth.mysql.model.ConnectionPermissionKey;
|
||||
import net.sourceforge.guacamole.net.auth.mysql.model.SystemPermissionExample;
|
||||
import net.sourceforge.guacamole.net.auth.mysql.model.SystemPermissionKey;
|
||||
import net.sourceforge.guacamole.net.auth.mysql.model.User;
|
||||
import net.sourceforge.guacamole.net.auth.mysql.model.UserExample;
|
||||
import net.sourceforge.guacamole.net.auth.mysql.model.UserPermissionExample;
|
||||
import net.sourceforge.guacamole.net.auth.mysql.model.UserPermissionKey;
|
||||
import net.sourceforge.guacamole.net.auth.mysql.model.UserWithBLOBs;
|
||||
import net.sourceforge.guacamole.net.auth.permission.ConnectionDirectoryPermission;
|
||||
import net.sourceforge.guacamole.net.auth.permission.ConnectionPermission;
|
||||
import net.sourceforge.guacamole.net.auth.permission.Permission;
|
||||
import net.sourceforge.guacamole.net.auth.permission.SystemPermission;
|
||||
import net.sourceforge.guacamole.net.auth.permission.UserDirectoryPermission;
|
||||
import net.sourceforge.guacamole.net.auth.permission.UserPermission;
|
||||
|
||||
/**
|
||||
* A utility to retrieve information about what objects a user has permission to.
|
||||
* @author James Muehlner
|
||||
*/
|
||||
public class PermissionCheckUtility {
|
||||
|
||||
@Inject
|
||||
UserMapper userDAO;
|
||||
|
||||
@Inject
|
||||
ConnectionMapper connectionDAO;
|
||||
|
||||
@Inject
|
||||
UserPermissionMapper userPermissionDAO;
|
||||
|
||||
@Inject
|
||||
ConnectionPermissionMapper connectionPermissionDAO;
|
||||
|
||||
@Inject
|
||||
SystemPermissionMapper systemPermissionDAO;
|
||||
|
||||
@Inject
|
||||
Provider<MySQLUser> mySQLUserProvider;
|
||||
|
||||
@Inject
|
||||
Provider<MySQLConnection> mySQLConnectionProvider;
|
||||
|
||||
public boolean checkUserReadAccess(int userID, int affectedUserID) {
|
||||
return checkUserAccess(userID, affectedUserID, MySQLConstants.READ_USER);
|
||||
}
|
||||
|
||||
public boolean checkUserWriteAccess(int userID, int affectedUserID) {
|
||||
return checkUserAccess(userID, affectedUserID, MySQLConstants.WRITE_USER);
|
||||
}
|
||||
|
||||
public boolean checkUserDeleteAccess(int userID, int affectedUserID) {
|
||||
return checkUserAccess(userID, affectedUserID, MySQLConstants.DELETE_USER);
|
||||
}
|
||||
|
||||
public boolean checkUserAdministerAccess(int userID, int affectedUserID) {
|
||||
return checkUserAccess(userID, affectedUserID, MySQLConstants.ADMINISTER_USER);
|
||||
}
|
||||
|
||||
public boolean checkUserReadAccess(int userID, String affectedUsername) {
|
||||
return checkUserAccess(userID, affectedUsername, MySQLConstants.READ_USER);
|
||||
}
|
||||
|
||||
public boolean checkUserWriteAccess(int userID, String affectedUsername) {
|
||||
return checkUserAccess(userID, affectedUsername, MySQLConstants.WRITE_USER);
|
||||
}
|
||||
|
||||
public boolean checkUserDeleteAccess(int userID, String affectedUsername) {
|
||||
return checkUserAccess(userID, affectedUsername, MySQLConstants.DELETE_USER);
|
||||
}
|
||||
|
||||
public boolean checkUserAdministerAccess(int userID, String affectedUsername) {
|
||||
return checkUserAccess(userID, affectedUsername, MySQLConstants.ADMINISTER_USER);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the user has the selected type of access to the affected user.
|
||||
* @param userID
|
||||
* @param affectedUsername
|
||||
* @param permissionType
|
||||
* @return
|
||||
*/
|
||||
private boolean checkUserAccess(int userID, String affectedUsername, String permissionType) {
|
||||
User affectedUser = getUser(affectedUsername);
|
||||
if(affectedUser != null)
|
||||
return checkUserAccess(userID, affectedUser.getUser_id(), permissionType);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the user has the selected type of access to the affected user.
|
||||
* @param userID
|
||||
* @param affectedUserID
|
||||
* @param permissionType
|
||||
* @return
|
||||
*/
|
||||
private boolean checkUserAccess(int userID, Integer affectedUserID, String permissionType) {
|
||||
UserPermissionExample example = new UserPermissionExample();
|
||||
example.createCriteria().andUser_idEqualTo(userID).andAffected_user_idEqualTo(affectedUserID).andPermissionEqualTo(permissionType);
|
||||
int count = userPermissionDAO.countByExample(example);
|
||||
return count > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find the list of all users a user has permission to administer.
|
||||
* @param userID
|
||||
* @return the list of all users this user has administer access to
|
||||
*/
|
||||
public List<MySQLUser> getAdministerableUsers(int userID) {
|
||||
return getUsers(userID, MySQLConstants.ADMINISTER_USER);
|
||||
}
|
||||
|
||||
/**
|
||||
* Find the list of all users a user has permission to delete.
|
||||
* @param userID
|
||||
* @return the list of all users this user has delete access to
|
||||
*/
|
||||
public List<MySQLUser> getDeletableUsers(int userID) {
|
||||
return getUsers(userID, MySQLConstants.DELETE_USER);
|
||||
}
|
||||
|
||||
/**
|
||||
* Find the list of all users a user has permission to write.
|
||||
* @param userID
|
||||
* @return the list of all users this user has write access to
|
||||
*/
|
||||
public List<MySQLUser> getWriteableleUsers(int userID) {
|
||||
return getUsers(userID, MySQLConstants.WRITE_USER);
|
||||
}
|
||||
|
||||
/**
|
||||
* Find the list of all users a user has permission to read.
|
||||
* @param userID
|
||||
* @return the list of all users this user read has access to
|
||||
*/
|
||||
public List<MySQLUser> getReadableUsers(int userID) {
|
||||
return getUsers(userID, MySQLConstants.READ_USER);
|
||||
}
|
||||
|
||||
/**
|
||||
* Find the list of all users a user has permission to.
|
||||
* The access type is defined by permissionType.
|
||||
* @param userID
|
||||
* @param permissionType
|
||||
* @return the list of all users this user has access to
|
||||
*/
|
||||
private List<MySQLUser> getUsers(int userID, String permissionType) {
|
||||
List<Integer> affectedUserIDs = getUserIDs(userID, permissionType);
|
||||
UserExample example = new UserExample();
|
||||
example.createCriteria().andUser_idIn(affectedUserIDs);
|
||||
List<UserWithBLOBs> userDBOjects = userDAO.selectByExampleWithBLOBs(example);
|
||||
List<MySQLUser> affectedUsers = new ArrayList<MySQLUser>();
|
||||
for(UserWithBLOBs affectedUser : userDBOjects) {
|
||||
MySQLUser mySQLUser = mySQLUserProvider.get();
|
||||
mySQLUser.init(affectedUser);
|
||||
affectedUsers.add(mySQLUser);
|
||||
}
|
||||
|
||||
return affectedUsers;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find the list of the IDs of all users a user has permission to.
|
||||
* The access type is defined by permissionType.
|
||||
* @param userID
|
||||
* @param permissionType
|
||||
* @return the list of all user IDs this user has access to
|
||||
*/
|
||||
private List<Integer> getUserIDs(int userID, String permissionType) {
|
||||
List<Integer> userIDs = new ArrayList<Integer>();
|
||||
UserPermissionExample example = new UserPermissionExample();
|
||||
example.createCriteria().andUser_idEqualTo(userID).andPermissionEqualTo(permissionType);
|
||||
List<UserPermissionKey> userPermissions = userPermissionDAO.selectByExample(example);
|
||||
for(UserPermissionKey permission : userPermissions)
|
||||
userIDs.add(permission.getAffected_user_id());
|
||||
|
||||
return userIDs;
|
||||
}
|
||||
|
||||
public boolean checkConnectionReadAccess(int userID, int affectedConnectionID) {
|
||||
return checkConnectionAccess(userID, affectedConnectionID, MySQLConstants.READ_CONNECTION);
|
||||
}
|
||||
|
||||
public boolean checkConnectionWriteAccess(int userID, int affectedConnectionID) {
|
||||
return checkConnectionAccess(userID, affectedConnectionID, MySQLConstants.WRITE_CONNECTION);
|
||||
}
|
||||
|
||||
public boolean checkConnectionDeleteAccess(int userID, int affectedConnectionID) {
|
||||
return checkConnectionAccess(userID, affectedConnectionID, MySQLConstants.DELETE_CONNECTION);
|
||||
}
|
||||
|
||||
public boolean checkConnectionAdministerAccess(int userID, int affectedConnectionID) {
|
||||
return checkConnectionAccess(userID, affectedConnectionID, MySQLConstants.ADMINISTER_CONNECTION);
|
||||
}
|
||||
|
||||
public boolean checkConnectionReadAccess(int userID, String affectedConnectionname) {
|
||||
return checkConnectionAccess(userID, affectedConnectionname, MySQLConstants.READ_CONNECTION);
|
||||
}
|
||||
|
||||
public boolean checkConnectionWriteAccess(int userID, String affectedConnectionname) {
|
||||
return checkConnectionAccess(userID, affectedConnectionname, MySQLConstants.WRITE_CONNECTION);
|
||||
}
|
||||
|
||||
public boolean checkConnectionDeleteAccess(int userID, String affectedConnectionname) {
|
||||
return checkConnectionAccess(userID, affectedConnectionname, MySQLConstants.DELETE_CONNECTION);
|
||||
}
|
||||
|
||||
public boolean checkConnectionAdministerAccess(int userID, String affectedConnectionname) {
|
||||
return checkConnectionAccess(userID, affectedConnectionname, MySQLConstants.ADMINISTER_CONNECTION);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the user has the selected type of access to the affected connection.
|
||||
* @param connectionID
|
||||
* @param affectedConnectionname
|
||||
* @param permissionType
|
||||
* @return
|
||||
*/
|
||||
private boolean checkConnectionAccess(int userID, String affectedConnectionName, String permissionType) {
|
||||
Connection connection = getConnection(affectedConnectionName);
|
||||
if(connection != null)
|
||||
return checkConnectionAccess(userID, connection.getConnection_id(), permissionType);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the user has the selected type of access to the affected connection.
|
||||
* @param connectionID
|
||||
* @param affectedConnectionID
|
||||
* @param permissionType
|
||||
* @return
|
||||
*/
|
||||
private boolean checkConnectionAccess(int userID, Integer affectedConnectionID, String permissionType) {
|
||||
ConnectionPermissionExample example = new ConnectionPermissionExample();
|
||||
example.createCriteria().andUser_idEqualTo(userID).andConnection_idEqualTo(affectedConnectionID).andPermissionEqualTo(permissionType);
|
||||
int count = connectionPermissionDAO.countByExample(example);
|
||||
return count > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find the list of all connections a user has permission to administer.
|
||||
* @param connectionID
|
||||
* @return the list of all connections this connection has administer access to
|
||||
*/
|
||||
public List<MySQLConnection> getAdministerableConnections(int userID) {
|
||||
return getConnections(userID, MySQLConstants.ADMINISTER_CONNECTION);
|
||||
}
|
||||
|
||||
/**
|
||||
* Find the list of all connections a user has permission to delete.
|
||||
* @param connectionID
|
||||
* @return the list of all connections this connection has delete access to
|
||||
*/
|
||||
public List<MySQLConnection> getDeletableConnections(int userID) {
|
||||
return getConnections(userID, MySQLConstants.DELETE_CONNECTION);
|
||||
}
|
||||
|
||||
/**
|
||||
* Find the list of all connections a user has permission to write.
|
||||
* @param connectionID
|
||||
* @return the list of all connections this connection has write access to
|
||||
*/
|
||||
public List<MySQLConnection> getWriteableleConnections(int userID) {
|
||||
return getConnections(userID, MySQLConstants.WRITE_CONNECTION);
|
||||
}
|
||||
|
||||
/**
|
||||
* Find the list of all connections a user has permission to read.
|
||||
* @param connectionID
|
||||
* @return the list of all connections this connection read has access to
|
||||
*/
|
||||
public List<MySQLConnection> getReadableConnections(int userID) {
|
||||
return getConnections(userID, MySQLConstants.READ_CONNECTION);
|
||||
}
|
||||
|
||||
/**
|
||||
* Find the list of all connections a user has permission to.
|
||||
* The access type is defined by permissionType.
|
||||
* @param connectionID
|
||||
* @param permissionType
|
||||
* @return the list of all connections this user has access to
|
||||
*/
|
||||
private List<MySQLConnection> getConnections(int userID, String permissionType) {
|
||||
List<Integer> affectedConnectionIDs = getConnectionIDs(userID, permissionType);
|
||||
ConnectionExample example = new ConnectionExample();
|
||||
example.createCriteria().andConnection_idIn(affectedConnectionIDs);
|
||||
List<Connection> connectionDBOjects = connectionDAO.selectByExample(example);
|
||||
List<MySQLConnection> affectedConnections = new ArrayList<MySQLConnection>();
|
||||
for(Connection affectedConnection : connectionDBOjects) {
|
||||
MySQLConnection mySQLConnection = mySQLConnectionProvider.get();
|
||||
mySQLConnection.init(affectedConnection);
|
||||
affectedConnections.add(mySQLConnection);
|
||||
}
|
||||
|
||||
return affectedConnections;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find the list of the IDs of all connections a user has permission to.
|
||||
* The access type is defined by permissionType.
|
||||
* @param connectionID
|
||||
* @param permissionType
|
||||
* @return the list of all connection IDs this user has access to
|
||||
*/
|
||||
private List<Integer> getConnectionIDs(int userID, String permissionType) {
|
||||
List<Integer> connectionIDs = new ArrayList<Integer>();
|
||||
ConnectionPermissionExample example = new ConnectionPermissionExample();
|
||||
example.createCriteria().andUser_idEqualTo(userID).andPermissionEqualTo(permissionType);
|
||||
List<ConnectionPermissionKey> connectionPermissions = connectionPermissionDAO.selectByExample(example);
|
||||
for(ConnectionPermissionKey permission : connectionPermissions)
|
||||
connectionIDs.add(permission.getConnection_id());
|
||||
|
||||
return connectionIDs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the user has the permission to create users.
|
||||
* @param userID
|
||||
* @return
|
||||
*/
|
||||
public boolean checkCreateUserPermission(int userID) {
|
||||
return checkSystemPermission(userID, MySQLConstants.CREATE_USER);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the user has the permission to create connections.
|
||||
* @param userID
|
||||
* @return
|
||||
*/
|
||||
public boolean checkCreateConnectionPermission(int userID) {
|
||||
return checkSystemPermission(userID, MySQLConstants.CREATE_CONNECTION);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the user has the selected system permission.
|
||||
* @param userID
|
||||
* @param systemPermissionType
|
||||
* @return
|
||||
*/
|
||||
private boolean checkSystemPermission(int userID, String systemPermissionType) {
|
||||
SystemPermissionExample example = new SystemPermissionExample();
|
||||
example.createCriteria().andUser_idEqualTo(userID).andPermissionEqualTo(systemPermissionType);
|
||||
int count = systemPermissionDAO.countByExample(example);
|
||||
return count > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a connection object by name.
|
||||
* @param name
|
||||
* @return
|
||||
*/
|
||||
private Connection getConnection(String name) {
|
||||
ConnectionExample example = new ConnectionExample();
|
||||
example.createCriteria().andConnection_nameEqualTo(name);
|
||||
List<Connection> connections = connectionDAO.selectByExample(example);
|
||||
if(connections.isEmpty())
|
||||
return null;
|
||||
|
||||
return connections.get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a user object by username.
|
||||
* @param userName
|
||||
* @return
|
||||
*/
|
||||
private User getUser(String username) {
|
||||
UserExample example = new UserExample();
|
||||
example.createCriteria().andUsernameEqualTo(username);
|
||||
List<User> users = userDAO.selectByExample(example);
|
||||
if(users.isEmpty())
|
||||
return null;
|
||||
|
||||
return users.get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all permissions a given user has.
|
||||
* @param userID
|
||||
* @return
|
||||
*/
|
||||
public Set<Permission> getAllPermissions(int userID) {
|
||||
Set<Permission> allPermissions = new HashSet<Permission>();
|
||||
|
||||
// first, user permissions
|
||||
UserPermissionExample userPermissionExample = new UserPermissionExample();
|
||||
userPermissionExample.createCriteria().andUser_idEqualTo(userID);
|
||||
List<UserPermissionKey> userPermissions = userPermissionDAO.selectByExample(userPermissionExample);
|
||||
List<Integer> affectedUserIDs = new ArrayList<Integer>();
|
||||
for(UserPermissionKey userPermission : userPermissions) {
|
||||
affectedUserIDs.add(userPermission.getAffected_user_id());
|
||||
}
|
||||
|
||||
UserExample userExample = new UserExample();
|
||||
userExample.createCriteria().andUser_idIn(affectedUserIDs);
|
||||
List<User> users = userDAO.selectByExample(userExample);
|
||||
Map<Integer, User> userMap = new HashMap<Integer, User>();
|
||||
for(User user : users) {
|
||||
userMap.put(user.getUser_id(), user);
|
||||
}
|
||||
|
||||
for(UserPermissionKey userPermission : userPermissions) {
|
||||
User affectedUser = userMap.get(userPermission.getAffected_user_id());
|
||||
UserPermission newPermission = new UserPermission(
|
||||
UserPermission.Type.valueOf(userPermission.getPermission()),
|
||||
affectedUser.getUsername()
|
||||
);
|
||||
allPermissions.add(newPermission);
|
||||
}
|
||||
|
||||
//secondly, connection permissions
|
||||
ConnectionPermissionExample connectionPermissionExample = new ConnectionPermissionExample();
|
||||
connectionPermissionExample.createCriteria().andUser_idEqualTo(userID);
|
||||
List<ConnectionPermissionKey> connectionPermissions = connectionPermissionDAO.selectByExample(connectionPermissionExample);
|
||||
List<Integer> affectedConnectionIDs = new ArrayList<Integer>();
|
||||
for(ConnectionPermissionKey connectionPermission : connectionPermissions) {
|
||||
affectedConnectionIDs.add(connectionPermission.getConnection_id());
|
||||
}
|
||||
|
||||
ConnectionExample connectionExample = new ConnectionExample();
|
||||
connectionExample.createCriteria().andConnection_idIn(affectedConnectionIDs);
|
||||
List<Connection> connections = connectionDAO.selectByExample(connectionExample);
|
||||
Map<Integer, Connection> connectionMap = new HashMap<Integer, Connection>();
|
||||
for(Connection connection : connections) {
|
||||
connectionMap.put(connection.getConnection_id(), connection);
|
||||
}
|
||||
|
||||
for(ConnectionPermissionKey connectionPermission : connectionPermissions) {
|
||||
Connection affectedConnection = connectionMap.get(connectionPermission.getConnection_id());
|
||||
ConnectionPermission newPermission = new ConnectionPermission(
|
||||
ConnectionPermission.Type.valueOf(connectionPermission.getPermission()),
|
||||
affectedConnection.getConnection_name()
|
||||
);
|
||||
allPermissions.add(newPermission);
|
||||
}
|
||||
|
||||
//and finally, system permissions
|
||||
SystemPermissionExample systemPermissionExample = new SystemPermissionExample();
|
||||
systemPermissionExample.createCriteria().andUser_idEqualTo(userID);
|
||||
List<SystemPermissionKey> systemPermissions = systemPermissionDAO.selectByExample(systemPermissionExample);
|
||||
for(SystemPermissionKey systemPermission : systemPermissions) {
|
||||
SystemPermission newPermission = null;
|
||||
if(systemPermission.getPermission().equals(MySQLConstants.CREATE_USER))
|
||||
newPermission = new UserDirectoryPermission(UserDirectoryPermission.Type.CREATE);
|
||||
else if(systemPermission.getPermission().equals(MySQLConstants.CREATE_CONNECTION))
|
||||
newPermission = new ConnectionDirectoryPermission(ConnectionDirectoryPermission.Type.CREATE);
|
||||
|
||||
if(newPermission != null)
|
||||
allPermissions.add(newPermission);
|
||||
}
|
||||
|
||||
return allPermissions;
|
||||
}
|
||||
}
|
@@ -39,7 +39,7 @@ import java.security.SecureRandom;
|
||||
|
||||
/**
|
||||
* Generates password salts via the SecureRandom utility.
|
||||
* @author dagger10k
|
||||
* @author James Muehlner
|
||||
*/
|
||||
public class SecureRandomSaltUtility implements SaltUtility {
|
||||
|
||||
|
@@ -5,7 +5,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
<id column="connection_id" property="connection_id" jdbcType="INTEGER" />
|
||||
<result column="connection_name" property="connection_name" jdbcType="VARCHAR" />
|
||||
@@ -15,7 +15,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
<where >
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or" >
|
||||
@@ -49,7 +49,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
<where >
|
||||
<foreach collection="example.oredCriteria" item="criteria" separator="or" >
|
||||
@@ -83,7 +83,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
connection_id, connection_name, protocol
|
||||
</sql>
|
||||
@@ -91,7 +91,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
select
|
||||
<if test="distinct" >
|
||||
@@ -110,7 +110,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
@@ -121,7 +121,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
delete from guacamole..guacamole_connection
|
||||
where connection_id = #{connection_id,jdbcType=INTEGER}
|
||||
@@ -130,7 +130,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
delete from guacamole..guacamole_connection
|
||||
<if test="_parameter != null" >
|
||||
@@ -141,7 +141,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
insert into guacamole..guacamole_connection (connection_id, connection_name, protocol
|
||||
)
|
||||
@@ -152,7 +152,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
insert into guacamole..guacamole_connection
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
@@ -182,7 +182,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
select count(*) from guacamole..guacamole_connection
|
||||
<if test="_parameter != null" >
|
||||
@@ -193,7 +193,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
update guacamole..guacamole_connection
|
||||
<set >
|
||||
@@ -215,7 +215,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
update guacamole..guacamole_connection
|
||||
set connection_id = #{record.connection_id,jdbcType=INTEGER},
|
||||
@@ -229,7 +229,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
update guacamole..guacamole_connection
|
||||
<set >
|
||||
@@ -246,7 +246,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
update guacamole..guacamole_connection
|
||||
set connection_name = #{connection_name,jdbcType=VARCHAR},
|
||||
|
@@ -5,7 +5,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
<id column="connection_id" property="connection_id" jdbcType="INTEGER" />
|
||||
<id column="parameter_name" property="parameter_name" jdbcType="VARCHAR" />
|
||||
@@ -15,7 +15,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
<where >
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or" >
|
||||
@@ -49,7 +49,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
<where >
|
||||
<foreach collection="example.oredCriteria" item="criteria" separator="or" >
|
||||
@@ -83,7 +83,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
connection_id, parameter_name, parameter_value
|
||||
</sql>
|
||||
@@ -91,7 +91,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
select
|
||||
<if test="distinct" >
|
||||
@@ -110,7 +110,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
@@ -122,7 +122,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
delete from guacamole..guacamole_connection_parameter
|
||||
where connection_id = #{connection_id,jdbcType=INTEGER}
|
||||
@@ -132,7 +132,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
delete from guacamole..guacamole_connection_parameter
|
||||
<if test="_parameter != null" >
|
||||
@@ -143,7 +143,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
insert into guacamole..guacamole_connection_parameter (connection_id, parameter_name, parameter_value
|
||||
)
|
||||
@@ -154,7 +154,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
insert into guacamole..guacamole_connection_parameter
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
@@ -184,7 +184,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
select count(*) from guacamole..guacamole_connection_parameter
|
||||
<if test="_parameter != null" >
|
||||
@@ -195,7 +195,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
update guacamole..guacamole_connection_parameter
|
||||
<set >
|
||||
@@ -217,7 +217,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
update guacamole..guacamole_connection_parameter
|
||||
set connection_id = #{record.connection_id,jdbcType=INTEGER},
|
||||
@@ -231,7 +231,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
update guacamole..guacamole_connection_parameter
|
||||
<set >
|
||||
@@ -246,7 +246,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
update guacamole..guacamole_connection_parameter
|
||||
set parameter_value = #{parameter_value,jdbcType=VARCHAR}
|
||||
|
@@ -5,7 +5,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
<id column="user_id" property="user_id" jdbcType="INTEGER" />
|
||||
<id column="connection_id" property="connection_id" jdbcType="INTEGER" />
|
||||
@@ -15,7 +15,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
<where >
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or" >
|
||||
@@ -49,7 +49,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
<where >
|
||||
<foreach collection="example.oredCriteria" item="criteria" separator="or" >
|
||||
@@ -83,7 +83,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
user_id, connection_id, permission
|
||||
</sql>
|
||||
@@ -91,7 +91,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
select
|
||||
<if test="distinct" >
|
||||
@@ -110,7 +110,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
delete from guacamole..guacamole_connection_permission
|
||||
where user_id = #{user_id,jdbcType=INTEGER}
|
||||
@@ -121,7 +121,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
delete from guacamole..guacamole_connection_permission
|
||||
<if test="_parameter != null" >
|
||||
@@ -132,7 +132,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
insert into guacamole..guacamole_connection_permission (user_id, connection_id, permission
|
||||
)
|
||||
@@ -143,7 +143,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
insert into guacamole..guacamole_connection_permission
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
@@ -173,7 +173,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
select count(*) from guacamole..guacamole_connection_permission
|
||||
<if test="_parameter != null" >
|
||||
@@ -184,7 +184,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
update guacamole..guacamole_connection_permission
|
||||
<set >
|
||||
@@ -206,7 +206,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
update guacamole..guacamole_connection_permission
|
||||
set user_id = #{record.user_id,jdbcType=INTEGER},
|
||||
|
@@ -5,7 +5,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
<id column="user_id" property="user_id" jdbcType="INTEGER" />
|
||||
<id column="permission" property="permission" jdbcType="CHAR" />
|
||||
@@ -14,7 +14,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
<where >
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or" >
|
||||
@@ -48,7 +48,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
<where >
|
||||
<foreach collection="example.oredCriteria" item="criteria" separator="or" >
|
||||
@@ -82,7 +82,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
user_id, permission
|
||||
</sql>
|
||||
@@ -90,7 +90,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
select
|
||||
<if test="distinct" >
|
||||
@@ -109,7 +109,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
delete from guacamole..guacamole_system_permission
|
||||
where user_id = #{user_id,jdbcType=INTEGER}
|
||||
@@ -119,7 +119,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
delete from guacamole..guacamole_system_permission
|
||||
<if test="_parameter != null" >
|
||||
@@ -130,7 +130,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
insert into guacamole..guacamole_system_permission (user_id, permission)
|
||||
values (#{user_id,jdbcType=INTEGER}, #{permission,jdbcType=CHAR})
|
||||
@@ -139,7 +139,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
insert into guacamole..guacamole_system_permission
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
@@ -163,7 +163,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
select count(*) from guacamole..guacamole_system_permission
|
||||
<if test="_parameter != null" >
|
||||
@@ -174,7 +174,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
update guacamole..guacamole_system_permission
|
||||
<set >
|
||||
@@ -193,7 +193,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
update guacamole..guacamole_system_permission
|
||||
set user_id = #{record.user_id,jdbcType=INTEGER},
|
||||
|
@@ -5,7 +5,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
<id column="user_id" property="user_id" jdbcType="INTEGER" />
|
||||
<result column="username" property="username" jdbcType="VARCHAR" />
|
||||
@@ -14,7 +14,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
<result column="password_hash" property="password_hash" jdbcType="BINARY" />
|
||||
<result column="password_salt" property="password_salt" jdbcType="BINARY" />
|
||||
@@ -23,7 +23,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
<where >
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or" >
|
||||
@@ -57,7 +57,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
<where >
|
||||
<foreach collection="example.oredCriteria" item="criteria" separator="or" >
|
||||
@@ -91,7 +91,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
user_id, username
|
||||
</sql>
|
||||
@@ -99,7 +99,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
password_hash, password_salt
|
||||
</sql>
|
||||
@@ -107,7 +107,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
select
|
||||
<if test="distinct" >
|
||||
@@ -128,7 +128,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
select
|
||||
<if test="distinct" >
|
||||
@@ -147,7 +147,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
@@ -160,7 +160,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
delete from guacamole..guacamole_user
|
||||
where user_id = #{user_id,jdbcType=INTEGER}
|
||||
@@ -169,7 +169,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
delete from guacamole..guacamole_user
|
||||
<if test="_parameter != null" >
|
||||
@@ -180,7 +180,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
insert into guacamole..guacamole_user (user_id, username, password_hash,
|
||||
password_salt)
|
||||
@@ -191,7 +191,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
insert into guacamole..guacamole_user
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
@@ -227,7 +227,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
select count(*) from guacamole..guacamole_user
|
||||
<if test="_parameter != null" >
|
||||
@@ -238,7 +238,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
update guacamole..guacamole_user
|
||||
<set >
|
||||
@@ -263,7 +263,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
update guacamole..guacamole_user
|
||||
set user_id = #{record.user_id,jdbcType=INTEGER},
|
||||
@@ -278,7 +278,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
update guacamole..guacamole_user
|
||||
set user_id = #{record.user_id,jdbcType=INTEGER},
|
||||
@@ -291,7 +291,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
update guacamole..guacamole_user
|
||||
<set >
|
||||
@@ -311,7 +311,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
update guacamole..guacamole_user
|
||||
set username = #{username,jdbcType=VARCHAR},
|
||||
@@ -323,7 +323,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
update guacamole..guacamole_user
|
||||
set username = #{username,jdbcType=VARCHAR}
|
||||
|
@@ -5,7 +5,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
<id column="user_id" property="user_id" jdbcType="INTEGER" />
|
||||
<id column="affected_user_id" property="affected_user_id" jdbcType="INTEGER" />
|
||||
@@ -15,7 +15,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
<where >
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or" >
|
||||
@@ -49,7 +49,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
<where >
|
||||
<foreach collection="example.oredCriteria" item="criteria" separator="or" >
|
||||
@@ -83,7 +83,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
user_id, affected_user_id, permission
|
||||
</sql>
|
||||
@@ -91,7 +91,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
select
|
||||
<if test="distinct" >
|
||||
@@ -110,7 +110,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
delete from guacamole..guacamole_user_permission
|
||||
where user_id = #{user_id,jdbcType=INTEGER}
|
||||
@@ -121,7 +121,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
delete from guacamole..guacamole_user_permission
|
||||
<if test="_parameter != null" >
|
||||
@@ -132,7 +132,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
insert into guacamole..guacamole_user_permission (user_id, affected_user_id, permission
|
||||
)
|
||||
@@ -143,7 +143,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
insert into guacamole..guacamole_user_permission
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
@@ -173,7 +173,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
select count(*) from guacamole..guacamole_user_permission
|
||||
<if test="_parameter != null" >
|
||||
@@ -184,7 +184,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
update guacamole..guacamole_user_permission
|
||||
<set >
|
||||
@@ -206,7 +206,7 @@
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Tue Feb 12 10:51:12 PST 2013.
|
||||
This element was generated on Tue Feb 12 20:35:54 PST 2013.
|
||||
-->
|
||||
update guacamole..guacamole_user_permission
|
||||
set user_id = #{record.user_id,jdbcType=INTEGER},
|
||||
|
Reference in New Issue
Block a user