| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library gcloud.db.meta_model; | 5 library gcloud.db.meta_model; |
| 6 | 6 |
| 7 import '../db.dart' as db; | 7 import '../db.dart' as db; |
| 8 | 8 |
| 9 @db.Kind(name: '__namespace__') | 9 @db.Kind(name: '__namespace__') |
| 10 class Namespace extends db.ExpandoModel { | 10 class Namespace extends db.ExpandoModel { |
| 11 static const int EmptyNamespaceId = 1; | 11 static const int EmptyNamespaceId = 1; |
| 12 | 12 |
| 13 String get name { | 13 String get name { |
| 14 // The default namespace will be reported with id 1. | 14 // The default namespace will be reported with id 1. |
| 15 if (id == NamespaceDescription.EmptyNamespaceId) return null; | 15 if (id == Namespace.EmptyNamespaceId) return null; |
| 16 return id; | 16 return id; |
| 17 } | 17 } |
| 18 } | 18 } |
| 19 | 19 |
| 20 @db.Kind(name: '__kind__') | 20 @db.Kind(name: '__kind__') |
| 21 class Kind extends db.Model { | 21 class Kind extends db.Model { |
| 22 String get name => id; | 22 String get name => id; |
| 23 } | 23 } |
| OLD | NEW |