summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/openslx/imagemaster/db/DbKey.java
blob: 837b9deff0db2bf17b1f9117c102d26e8edccf07 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package org.openslx.imagemaster.db;


public class DbKey
{
	
	public final byte[] bytes;
	
	public DbKey(byte[] bytes) {
		this.bytes = bytes;
	}
	
	// TODO: One class per db-table (or per join). This should just be part of DbSatellite
	public static DbKey fromOrganization(String organization) {
		return MySQL.findUniqueOrNull( DbKey.class, "SELECT publickey FROM satellite WHERE organization = ?",	organization );
	}
}