app/repository/TripRepository.java
public void insert(Trip trip, List<TripDestination> tripDestinations) {
        ebeanServer.insert(trip);
        for (TripDestination tripDestination : tripDestinations) {
                tripDestination.setTripId(trip.getId());
                Destination dest = destinationRepository.lookup(tripDestination.getDestinationId());
                if (dest.getVisible() == 1) {
                    destinationRepository.setOwnerAsAdmin(dest.getDestinationId());
                }
            ebeanServer.insert(tripDestination);
        }
    }
/**
     * insert trip into database
     * @param trip Trip object to be inserted in the database
     * @param tripDestinations List of trip destinations to be inserted that are inside the trip
     */
insert trip into database
@param trip Trip object to be inserted in the database
@param tripDestinations List of trip destinations to be inserted that are inside the trip
insert trip into database @param trip Trip object to be inserted in the database @param tripDestinations List of trip destinations to be inserted that are inside the trip
public void insert(Trip trip, List<TripDestination> tripDestinations) {
        ebeanServer.insert(trip);
        for (TripDestination tripDestination : tripDestinations) {
                tripDestination.setTripId(trip.getId());
                Destination dest = destinationRepository.lookup(tripDestination.getDestinationId());
                if (dest.getVisible() == 1) {
                    destinationRepository.setOwnerAsAdmin(dest.getDestinationId());
                }
            ebeanServer.insert(tripDestination);
        }
    }
public void insert ( Trip trip , List < TripDestination > tripDestinations ) { ebeanServer . insert ( trip ) ; for ( TripDestination tripDestination : tripDestinations ) { tripDestination . setTripId ( trip . getId ( ) ) ; Destination dest = destinationRepository . lookup ( tripDestination . getDestinationId ( ) ) ; if ( dest . getVisible ( ) == 1 ) { destinationRepository . setOwnerAsAdmin ( dest . getDestinationId ( ) ) ; } ebeanServer . insert ( tripDestination ) ; } }
insert trip into database
 @param trip Trip object to be inserted in the database
 @param tripDestinations List of trip destinations to be inserted that are inside the trip
insert trip into database @param trip Trip object to be inserted in the database @param tripDestinations List of trip destinations to be inserted that are inside the trip