summaryrefslogblamecommitdiffstats
path: root/src/main/java/org/openslx/imagemaster/db/DbSatellite.java
blob: 9f3cd014e73a7c1277c14e65173ccae59383dca2 (plain) (tree)
1
2
3
4
5
6
7
8
9
10

                                   


                        


                                                           

                                                                            




                                                 

                                                                         



                                                                                                                                                                           
                                                               

         

                                  


                               

                               


                            

                                       

                                    
 
package org.openslx.imagemaster.db;

public class DbSatellite
{

	private String organization, address, name;

	// needs to be public in order to be found by MySQL
	public DbSatellite(String organization, String address, String name)
	{
		this.organization = organization;
		this.address = address;
		this.name = name;
	}

	public static DbSatellite fromOrganization( String organization )
	{
		return MySQL
				.findUniqueOrNull(
						DbSatellite.class,
						"SELECT satellite.organization, satellite.address, satellite.name FROM satellite WHERE satellite.organization = ? LIMIT 1",
						organization );
	}

	public String getAddress()
	{
		return address;
	}

	public String getName()
	{
		return name;
	}

	public String getOrganization()
	{
		return organization;
	}
}