mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-17 20:50:44 +00:00
add method getAssociationByName
This commit is contained in:
@ -1329,6 +1329,21 @@ public class QTableMetaData implements QAppChildMetaData, Serializable, MetaData
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Getter for an association by name
|
||||
*******************************************************************************/
|
||||
public Optional<Association> getAssociationByName(String name)
|
||||
{
|
||||
if(associations == null)
|
||||
{
|
||||
return (Optional.empty());
|
||||
}
|
||||
|
||||
return (getAssociations().stream().filter(a -> a.getName().equals(name)).findFirst());
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Setter for associations
|
||||
*******************************************************************************/
|
||||
|
Reference in New Issue
Block a user