Package org.jitterbit.integration.data.access

Examples of org.jitterbit.integration.data.access.Permissions


    public static void main(String[] args) throws Exception {
        Connection conn = ServerDbInfo.getTranDbConnectionInfo().getConnection();
        try {
            User user = new User(1, "torgil");
            EntityDescriptor entity = new EntityDescriptor(EntityType.Operation, 2);
            Permissions p = new TranDbUserPermissionsLookup(conn).getPermissions(user, entity);
            System.out.println(p);
        } finally {
            KongaDbUtils.close(conn);
        }
    }
View Full Code Here


            stmt.setLong(2, group.getDatabaseId());
            rs = stmt.executeQuery();
            while (rs.next()) {
                int allowed = rs.getInt(1);
                int denied = rs.getInt(2);
                return new Permissions(Permission.fromBitCode(allowed), Permission.fromBitCode(denied));
            }
        } catch (SQLException ex) {
            throw new AccessLookupException(ex);
        } finally {
            KongaDbUtils.close(rs);
            KongaDbUtils.close(stmt);
        }
        return new Permissions();
    }
View Full Code Here

            stmt.setLong(2, user.getDatabaseId());
            rs = stmt.executeQuery();
            while (rs.next()) {
                int allowed = rs.getInt(1);
                int denied = rs.getInt(2);
                return new Permissions(Permission.fromBitCode(allowed), Permission.fromBitCode(denied));
            }
        } catch (SQLException ex) {
            throw new AccessLookupException(ex);
        } finally {
            KongaDbUtils.close(rs);
            KongaDbUtils.close(stmt);
        }
        return new Permissions();
    }
View Full Code Here

TOP

Related Classes of org.jitterbit.integration.data.access.Permissions

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.