Hi,
I'm keeping IP addresses stored as 32-bit integers in MySQL. I'm keeping an array of permissions for these integers in SmartGWT, so a user is only able to access the IPs that they are allowed to. However, Criteria.addCriteria does not support a Long array. See code below:
Criteria remotesCriteria = new Criteria();
Long [] remote_ips = new
Long[session.getUser().getRemotePermissions().size()];
session.getUser().getRemotePermissions().toArray(remote_ips);
remotesCriteria.addCriteria("IpAddress", remote_ips); <---- Not supported.
How can I get this to work with a Long array?
I'm keeping IP addresses stored as 32-bit integers in MySQL. I'm keeping an array of permissions for these integers in SmartGWT, so a user is only able to access the IPs that they are allowed to. However, Criteria.addCriteria does not support a Long array. See code below:
Criteria remotesCriteria = new Criteria();
Long [] remote_ips = new
Long[session.getUser().getRemotePermissions().size()];
session.getUser().getRemotePermissions().toArray(remote_ips);
remotesCriteria.addCriteria("IpAddress", remote_ips); <---- Not supported.
How can I get this to work with a Long array?
Comment